aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/usage.h3
-rw-r--r--networking/inetd.c7
2 files changed, 4 insertions, 6 deletions
diff --git a/include/usage.h b/include/usage.h
index dad6078cd..5d7c36551 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -1193,10 +1193,11 @@
"\t-f\tforce de/configuration"
#define inetd_trivial_usage \
- "[-q len] [conf]"
+ "[-f] [-q len] [conf]"
#define inetd_full_usage \
"Listens for network connections and launches programs\n\n" \
"Option:\n" \
+ "\t-f\tRun as a foreground progress\n" \
"\t-q\tSets the size of the socket listen queue to\n" \
"\t\tthe specified value. Default is 128"
diff --git a/networking/inetd.c b/networking/inetd.c
index c540a8578..0604b14bf 100644
--- a/networking/inetd.c
+++ b/networking/inetd.c
@@ -758,17 +758,14 @@ extern int inetd_main(int argc, char *argv[])
LastArg = environ[-1] + strlen(environ[-1]);
#endif
-#if defined(__uClinux__)
opt = bb_getopt_ulflags(argc, argv, "q:f", &sq);
if (!(opt & 2)) {
daemon(0, 0);
+#if defined(__uClinux__)
/* reexec for vfork() do continue parent */
vfork_daemon_rexec(argc, argv, "-f");
- }
-#else
- opt = bb_getopt_ulflags(argc, argv, "q:", &sq);
- daemon(0, 0);
#endif /* uClinux */
+ }
if(opt & 1) {
global_queuelen = atoi(sq);