LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Newbie (Send PID to background problem) (https://www.linuxquestions.org/questions/linux-newbie-8/newbie-send-pid-to-background-problem-300961/)

Phonon 03-12-2005 10:25 PM

Newbie (Send PID to background problem)
 
Dear mates,

I really need your help for now ...
I installed Ubuntu Warty release last week - and everything works fine so far ...
however I messed up a little bit the following thing:

Starting e.g. emacs from a terminal (xterm, gnome-terminal) with

emacs &

and closing the parent terminal also closes emacs (sic !)

I am really looking out for infos (was looking in google for 3 hours now),
what could be the reason for this behavior. I would be very thankful
for any little hint.

Thx a lot and cheers,

Stephan

Matir 03-12-2005 10:40 PM

When you send it to the background, it is still associated with your terminal. On logging out, a HUP signal is sent to all the programs, including those in the background. Use of the "nohup" utility is indicated in these situations.

droscigno 03-12-2005 10:42 PM

Try doing this instead:

( emacs & )

The parens around the command will spawn a subshell, so when you
close your term emacs will keep on running.

Phonon 03-12-2005 10:50 PM

100000 x thx !!!
 
You mates are really great ... Linux community for ever !!... both hints work perfectly ...

just a short comment on this: On a redhat enterprise machine I normally use just
the & and the process is a new parent (and not a child any more),

There tcsh is running, not bash ... is this the reason for that ?

Thx very very much for your help ...


All times are GMT -5. The time now is 12:30 PM.