On 11 Aug 1999, Adam Morrison wrote:


  Hi Adam,


Most things you run in the backround (like ftp, irc, and such) install
their own handlers.

In fact, you have to know for sure that the job you run has not installed 
a signal handler.

So, practically, the job must:

1). not be interactive.
2). not install it's own handler.

If you can make sure that it answers these criteria, then it will work.
(like backgrounding a matlab job).

If you can't, then you'd better use nohup or screen.

--Ariel


P.S.  Notice that I am more concerned in giving practical answers, than
      theoretical ones.

> Oh, really?
> 
> A ``job'' is a process group.When a session leader (e.g. a shell)
> exits, the kernel checks whether there is a controlling terminal
> associated with its session.If so, the foreground process group of
> that terminal is signaled with exactly one ``signals'', SIGHUP.
> 
> Shells without job control don't deal with process groups at all, and
> so all their children get SIGHUP'd when they exit.For these cases,
> nohup(1) simply invokes commands with SIGHUP ignored.(Obviously, if
> you run a program that independently installs a SIGHUP handler with
> `&' under sh, that handler will get called when the shell exits, which
> may or may not be alright.)
> 
> Shells with job control (csh descendants, bash, some incarnations of
> sh, etc) have, well, JOB CONTROL.Jobs are started in their own
> process groups, and the shell changes the terminal's foreground
> process group whenever a job is brought into the foreground (e.g. with
> `fg').Therefore, the kernel won't send a SIGHUP to background jobs.
> 
> 
> =================================================================
> To unsubscribe, send mail to [EMAIL PROTECTED] with
> the word "unsubscribe" in the message body, e.g., run the command
> echo unsubscribe | mail [EMAIL PROTECTED]
> 

--
Ariel Biener
e-mail: [EMAIL PROTECTED]           Work phone: 03-640608
fingerprint = 07 D1 E5 3E EF 6D E5 82 0B E9 21 D4 3C 7D 8B BC


=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to