summaryrefslogtreecommitdiffstats
path: root/sbin/shutdown
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1997-08-23 14:10:34 +0000
committerjoerg <joerg@FreeBSD.org>1997-08-23 14:10:34 +0000
commit68fb49d725c5ebbcb8152c13476eea9eef00b447 (patch)
treeb62e998e38a34c73bed19ab1dd79ba9d5e426bc3 /sbin/shutdown
parent6f8d5037591a322d30b1836f95d83495ae5255cb (diff)
downloadFreeBSD-src-68fb49d725c5ebbcb8152c13476eea9eef00b447.zip
FreeBSD-src-68fb49d725c5ebbcb8152c13476eea9eef00b447.tar.gz
Make the daemon process a true daemon by calling setsid().
PR: bin/3202 Submitted by: Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>
Diffstat (limited to 'sbin/shutdown')
-rw-r--r--sbin/shutdown/shutdown.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/shutdown/shutdown.c b/sbin/shutdown/shutdown.c
index f892fcf..d9fc5da 100644
--- a/sbin/shutdown/shutdown.c
+++ b/sbin/shutdown/shutdown.c
@@ -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();
OpenPOWER on IntegriCloud