aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2023-12-15 11:42:51 +0000
committerRon Yorston <rmy@pobox.com>2023-12-15 11:42:51 +0000
commit06e977c68e8cbfdd50b19a9197f31ba5af02c0d4 (patch)
tree3efff3c8d0dad9c8cfaf2a59f11bd2138798b9ef
parent8299b2403606e503012f2b6f3f41cbd500c631d4 (diff)
downloadbusybox-w32-06e977c68e8cbfdd50b19a9197f31ba5af02c0d4.tar.gz
busybox-w32-06e977c68e8cbfdd50b19a9197f31ba5af02c0d4.tar.bz2
busybox-w32-06e977c68e8cbfdd50b19a9197f31ba5af02c0d4.zip
httpd: fix failure to run daemonised
Since commit 2af141a2c (ash: changes to login shell functionality) httpd has failed to run in the background (i.e. without the '-f' option). This was due the removal of support for applet names with a '-' prefix. Although this feature isn't used by the shell it was used by httpd to mark when the process had been daemonised. Adds 16 bytes. (GitHub issue #378)
-rw-r--r--libbb/appletlib.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libbb/appletlib.c b/libbb/appletlib.c
index 34082ad94..254fa251f 100644
--- a/libbb/appletlib.c
+++ b/libbb/appletlib.c
@@ -1395,10 +1395,9 @@ int main(int argc UNUSED_PARAM, char **argv)
1395 argv++; 1395 argv++;
1396# endif 1396# endif
1397 applet_name = argv[0]; 1397 applet_name = argv[0];
1398# if !ENABLE_PLATFORM_MINGW32
1399 if (applet_name[0] == '-') 1398 if (applet_name[0] == '-')
1400 applet_name++; 1399 applet_name++;
1401# else 1400# if ENABLE_PLATFORM_MINGW32
1402 str_tolower(argv[0]); 1401 str_tolower(argv[0]);
1403 bs_to_slash(argv[0]); 1402 bs_to_slash(argv[0]);
1404 if (has_exe_suffix_or_dot(argv[0])) { 1403 if (has_exe_suffix_or_dot(argv[0])) {