aboutsummaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-03-26 13:35:09 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-03-26 13:35:09 +0000
commite23052af8fb88e90e88f59671af5264d12eb7686 (patch)
treef4ae0be26d5debff091d2c976e77fa8050c6758c /miscutils
parent7588a049ebf057514cc194eb8835cfd85e954af8 (diff)
downloadbusybox-w32-e23052af8fb88e90e88f59671af5264d12eb7686.tar.gz
busybox-w32-e23052af8fb88e90e88f59671af5264d12eb7686.tar.bz2
busybox-w32-e23052af8fb88e90e88f59671af5264d12eb7686.zip
Attempt to get more applets compile for NOMMU.
TODO_config_nommu documents what I managed to compile so far (yay! msh works! cool). inetd, telnetd, httpd still do not compile. TODO Also make fork(), daemon() produce warnings on compile stage (in addition to erros on link stage). git-svn-id: svn://busybox.net/trunk/busybox@18245 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/setsid.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/miscutils/setsid.c b/miscutils/setsid.c
index 6db07be5f..c878f524b 100644
--- a/miscutils/setsid.c
+++ b/miscutils/setsid.c
@@ -22,21 +22,12 @@ int setsid_main(int argc, char *argv[])
22 if (argc < 2) 22 if (argc < 2)
23 bb_show_usage(); 23 bb_show_usage();
24 24
25 if (getpgrp() == getpid()) { 25 /* Comment why is this necessary? */
26 switch (fork()) { 26 if (getpgrp() == getpid())
27 case -1: 27 forkexit_or_rexec(argv);
28 bb_perror_msg_and_die("fork");
29 case 0:
30 break;
31 default: /* parent */
32 exit(0);
33 }
34 }
35 /* child */
36 28
37 setsid(); /* no error possible */ 29 setsid(); /* no error possible */
38 30
39 BB_EXECVP(argv[1], argv + 1); 31 BB_EXECVP(argv[1], argv + 1);
40
41 bb_perror_msg_and_die("%s", argv[1]); 32 bb_perror_msg_and_die("%s", argv[1]);
42} 33}