summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/sliplogin/sliplogin.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/usr.sbin/sliplogin/sliplogin.c b/usr.sbin/sliplogin/sliplogin.c
index 0ee7c46f156..9cd28ee6918 100644
--- a/usr.sbin/sliplogin/sliplogin.c
+++ b/usr.sbin/sliplogin/sliplogin.c
@@ -39,7 +39,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)sliplogin.c 5.6 (Berkeley) 3/2/91";*/
-static char rcsid[] = "$Id: sliplogin.c,v 1.7 1998/01/21 00:25:26 deraadt Exp $";
+static char rcsid[] = "$Id: sliplogin.c,v 1.8 1998/07/08 21:45:04 deraadt Exp $";
#endif /* not lint */
/*
@@ -239,8 +239,15 @@ main(argc, argv)
* and ensure that the slip line is our controlling terminal.
*/
#ifdef POSIX
- if (fork() > 0)
+ switch (fork()) {
+ case -1:
+ perror("fork");
+ exit(1);
+ case 0:
+ break;
+ default:
exit(0);
+ }
if (setsid() == -1)
perror("setsid");
#else