Make the daemon process a true daemon by calling setsid().
PR: bin/3202 Submitted by: Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>
This commit is contained in:
parent
84c2e30193
commit
32c9dffb9d
@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
* $Id: shutdown.c,v 1.7 1997/06/19 14:28:32 charnier Exp $
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@ -196,6 +196,7 @@ main(argc, argv)
|
||||
if (forkpid)
|
||||
errx(0, "[pid %d]", forkpid);
|
||||
}
|
||||
setsid();
|
||||
#endif
|
||||
openlog("shutdown", LOG_CONS, LOG_AUTH);
|
||||
loop();
|
||||
|
Loading…
Reference in New Issue
Block a user