This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: bash and '&'


Hi, all:

The following message was returned because of the full mail box in Cygnus.
Therefor, I am sending it again and hoping it can get through this time.

-------------------

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 =.
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@comdyn.com.au>
To: gnu-win32@cygnus.com <gnu-win32@cygnus.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@cygnus.com" with one line of text: "help".
>

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Sincerely,
Wei Ku

***************************************
Department of Physics and Astronomy
The University of Tennessee
1408 Circle Drive
Knoxville, Tennessee 37996-1200
weiku@utkux.utcc.utk.edu
---------------------------------------
Solid State Division
Oak Ridge National Laboratory
P.O.Box 2008
Oak Ridge, TN 37831-6032
Phone: (423) 574-5795
Fax: (423) 574-4143
weiku@solid.ssd.ornl.gov
***************************************


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]