mirror of
https://github.com/sheumann/hush.git
synced 2025-01-11 23:29:51 +00:00
Fixup bugs in last patch
This commit is contained in:
parent
f3a02bbf41
commit
68d4a85f12
@ -203,8 +203,9 @@ crond_main(int ac, char **av)
|
|||||||
if (!(opt & 4)) {
|
if (!(opt & 4)) {
|
||||||
if(daemon(1, 0) < 0) {
|
if(daemon(1, 0) < 0) {
|
||||||
bb_perror_msg_and_die("daemon");
|
bb_perror_msg_and_die("daemon");
|
||||||
|
}
|
||||||
#if defined(__uClinux__)
|
#if defined(__uClinux__)
|
||||||
} else {
|
else {
|
||||||
/* reexec for vfork() do continue parent */
|
/* reexec for vfork() do continue parent */
|
||||||
vfork_daemon_rexec(ac, av, "-f");
|
vfork_daemon_rexec(ac, av, "-f");
|
||||||
}
|
}
|
||||||
|
@ -832,13 +832,13 @@ inetd_main(int argc, char *argv[])
|
|||||||
|
|
||||||
#if defined(__uClinux__)
|
#if defined(__uClinux__)
|
||||||
opt = bb_getopt_ulflags(argc, argv, "q:f", &sq);
|
opt = bb_getopt_ulflags(argc, argv, "q:f", &sq);
|
||||||
if (!(opt & 4)) {
|
if (!(opt & 2)) {
|
||||||
daemon(0, 0);
|
daemon(0, 0);
|
||||||
/* reexec for vfork() do continue parent */
|
/* reexec for vfork() do continue parent */
|
||||||
vfork_daemon_rexec(argc, argv, "-f");
|
vfork_daemon_rexec(argc, argv, "-f");
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
opt = bb_getopt_ulflags(ac, av, "q:", &sq);
|
opt = bb_getopt_ulflags(argc, argv, "q:", &sq);
|
||||||
daemon(0, 0);
|
daemon(0, 0);
|
||||||
#endif /* uClinux */
|
#endif /* uClinux */
|
||||||
|
|
||||||
|
@ -147,7 +147,6 @@ extern int klogd_main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (doFork) {
|
if (doFork) {
|
||||||
#if !defined(__UCLIBC__) || defined(__UCLIBC_HAS_MMU__)
|
|
||||||
if (daemon(0, 1) < 0)
|
if (daemon(0, 1) < 0)
|
||||||
bb_perror_msg_and_die("daemon");
|
bb_perror_msg_and_die("daemon");
|
||||||
#if defined(__uClinux__)
|
#if defined(__uClinux__)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user