LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-12-2005, 10:25 PM   #1
Phonon
LQ Newbie
 
Registered: Mar 2005
Posts: 3

Rep: Reputation: 0
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
 
Old 03-12-2005, 10:40 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
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.
 
Old 03-12-2005, 10:42 PM   #3
droscigno
LQ Newbie
 
Registered: Mar 2005
Location: Seattle
Posts: 2

Rep: Reputation: 0
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.
 
Old 03-12-2005, 10:50 PM   #4
Phonon
LQ Newbie
 
Registered: Mar 2005
Posts: 3

Original Poster
Rep: Reputation: 0
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 ...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
code that send a process to the background feetyouwell Programming 5 11-29-2010 03:20 PM
send commands to background processes chatterbug89 Linux - General 2 07-13-2005 03:55 PM
is there a system call to send process to run in the background? feetyouwell Programming 4 10-01-2004 04:58 AM
send process to background radam Linux - General 6 07-13-2004 04:33 PM
/service/qmail-send/log: up (pid 1924) 20682 seconds, want down fuzzyash Linux - Software 0 02-18-2004 08:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration