^D in terminal causes logout

Sage
Posts: 1,403
Joined: 2005.07
Post: #1
Control-D in the terminal causes an instant logout, without changing Control-D (I use it for other things), does anyone know how to stop it logging you out?

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #2
Shouldn't the shell quit when it reaches the end of input? What would you want it to do?

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #3
not quit...

maybe I didnt think this through.
I would only want to change this for the actual shell in using interactively though.

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Member
Posts: 567
Joined: 2004.07
Post: #4
^D is the standard exit signal for bash... why would you want to change it?

It's not magic, it's Ruby.
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #5
because some programs have me hit ^D multipe times to quit, its very easy to press again once you are back in the shell. So is there some good way to change it for just my interactive shell?
e.g. not affect if I were to do "echo blah | bash"

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #6
just found out I can use ^Z to suspend a process, so its still running but in background then fg to restart it, jobs to list suspended processes, and kill %n to kill a suspended process.
so ^Z doesn't logout in the shell Smile

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #7
So you'd rather suspend then kill an app instead of hitting ^d? (scratches head)

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  iPhone’s Very Own Credit Card Terminal michelle2010 0 2,049 Jan 11, 2010 10:59 AM
Last Post: michelle2010
  Terminal/bash one liners unknown 10 5,079 Apr 19, 2007 01:48 AM
Last Post: unknown
  Fullscreen Terminal Nick 12 5,685 Aug 30, 2005 07:53 AM
Last Post: Nick
  Terminal use question - how to access directories start from the hard disk Byron Clarke 12 6,319 Aug 29, 2005 07:08 AM
Last Post: Malarkey