aboutsummaryrefslogtreecommitdiff
path: root/sbin/shutdown
diff options
context:
space:
mode:
authorJoerg Wunsch <joerg@FreeBSD.org>1997-08-23 14:10:34 +0000
committerJoerg Wunsch <joerg@FreeBSD.org>1997-08-23 14:10:34 +0000
commit32c9dffb9de2764382cd5c6105f6121d9f9af208 (patch)
tree0a189a4983f2f524de57201981138d7c392e63ce /sbin/shutdown
parent84c2e301937e01aca847a2cafe36a3fbd51857a5 (diff)
downloadsrc-32c9dffb9de2764382cd5c6105f6121d9f9af208.tar.gz
src-32c9dffb9de2764382cd5c6105f6121d9f9af208.zip
Make the daemon process a true daemon by calling setsid().
PR: bin/3202 Submitted by: Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>
Notes
Notes: svn path=/head/; revision=28613
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 f892fcf4933a..d9fc5da0c374 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();