diff options
author | Thomas Bushnell <thomas@gnu.org> | 1999-09-18 06:00:42 +0000 |
---|---|---|
committer | Thomas Bushnell <thomas@gnu.org> | 1999-09-18 06:00:42 +0000 |
commit | e119b22c591c60836e5ccf270f9feeaea8ee0e80 (patch) | |
tree | 5109edd33bdbd5fd9890e60f670a6b3a5ea209a9 | |
parent | 457268a31380ed3cf80573962ebe15f88b9e42ff (diff) |
1999-09-18 Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de>
* runttys.c (run): Only call error if setsid returns -1.
* console-run.c (open_console): Likewise.
-rw-r--r-- | daemons/ChangeLog | 5 | ||||
-rw-r--r-- | daemons/console-run.c | 2 | ||||
-rw-r--r-- | daemons/runttys.c | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/daemons/ChangeLog b/daemons/ChangeLog index 4ad0a5da..a5acc7b5 100644 --- a/daemons/ChangeLog +++ b/daemons/ChangeLog @@ -1,3 +1,8 @@ +1999-09-18 Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de> + + * runttys.c (run): Only call error if setsid returns -1. + * console-run.c (open_console): Likewise. + 1999-07-10 Roland McGrath <roland@baalperazim.frob.com> * console-run.c (open_console): Move first setting of TERMINAL and diff --git a/daemons/console-run.c b/daemons/console-run.c index 0cb764d0..ccfd3874 100644 --- a/daemons/console-run.c +++ b/daemons/console-run.c @@ -203,7 +203,7 @@ open_console (char **namep) dup2 (0, 1); dup2 (0, 2); - if (setsid ()) + if (setsid () == -1) error (0, errno, "setsid"); /* Set the console to our pgrp. */ diff --git a/daemons/runttys.c b/daemons/runttys.c index 7da9e9c2..b8c3e7f0 100644 --- a/daemons/runttys.c +++ b/daemons/runttys.c @@ -192,7 +192,7 @@ run (char **argv, int do_setsid) return pid; else { - if (do_setsid && setsid ()) + if (do_setsid && setsid () == -1) error (0, errno, "setsid"); errno = 0; |