Mail Archives: cygwin/1998/03/30/18:39:07
You are right about '&' which originally means "background".
However, if one runs a job with '&' in bash or use 'ctrl-z' + "bg"
combination to send a job to background, the job will survive even one log
out of bash with "exit" command. That it, it is still running with PPID = 1.
This is "equivalent" to the functionality of "nohup" command. I accidentally
found this nice feature on IBM AIX machine. After that, I have not used
"nohup" anymore -- too lazy to type ;-)
I do not know how bash achieves this. I just know that this is really great
if one submits a long job without using "nohup" command and decide to log
out. Based on the test I did on AIX machine, ksh did not do this. ( This is
one of the reason I switch to bash. )
Please correct me if my idea is not right. Also, if someone knows how this
is done in bash, I would love to understand how it is done by bash.
Thank you in advance.
Wei Ku
-----Original Message-----
From: raf <raf AT comdyn DOT com DOT au>
To: gnu-win32 AT cygnus DOT com <gnu-win32 AT cygnus DOT com>
Date: Friday, March 27, 1998 3:42 AM
Subject: Re: bash and '&'
>Wei Ku wrote:
>
>>>I want to leave a simple program running after quiting the shell, and
>>>even logging off. It's done under unix by adding '&'. I failed to do
>>>this using cygwin32. Is it supposed to behave the same way under
>>>cygwin32? What should I do?
>
>>As far as I can tell, the only shell that will do what you describe is
bash.
>>Did you run bash or sh when you log in ?
>
>i thought this was done with 'nohup'.
>'&' only puts the process in the backgroup.
>it doesn't make it ignore the HUP and QUIT signals,
>or does it?
>
>
>raf
>
>-
>For help on using this list (especially unsubscribing), send a message to
>"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
>
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -