bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [feature request] setpgid and setsid builtins


From: Francis Montagnac
Subject: Re: [feature request] setpgid and setsid builtins
Date: Tue, 16 Apr 2002 17:54:13 +0200

> No, you can use an external wrapper command.  If you use Linux, the
> util-linux package has the "setsid" command.

Yes, but:

1)  the "setsid" command doesn't exist on every unix system. 
    Ex: solaris 2.6 2.8, OSF1 V4.0

2)  you cannot give the "setsid" command a bash function as argument.

> Also, my idtools package has the "setstate" command:
> <URL:http://multivac.cwru.edu./idtools/>.
 
I'll have a look. Thanks.

> >   exec_with_timeout () {

> This code works for me without setpgid.

Only if you call it directly from a login shell in monitor mode. In
this case the two background processes are effectively put in a
separate process group.  This will not be the case otherwise, and you
will not be able to kill eventual child processes.

    Francis

PS: the watchdog was incorrect in my example. It should be:

    ( sleep $timeout; kill -TERM -$pid; sleep 5; kill -KILL -$pid )  &



reply via email to

[Prev in Thread] Current Thread [Next in Thread]