logo       

Re: busybox-cvs Digest, Vol 4, Issue 30: msg#00191

linux.busybox

Subject: Re: busybox-cvs Digest, Vol 4, Issue 30

Erik.

Message: 4
Subject: [BusyBox-cvs] busybox/networking Config.in, 1.19, 1.20
httpd.c, 1.10, 1.11 inetd.c, 1.4, 1.5 Makefile.in, 1.16, 1.17

Update of /var/cvs/busybox/networking
In directory winder:/tmp/cvs-serv27801/networking

Modified Files:
Config.in httpd.c inetd.c Makefile.in Log Message:
last_patch95 from vodz:

Hi.

Last patch have new libbb function
vfork_rexec() for can use daemon() to uClinux system.
This patched daemons: syslog, klogd, inetd, crond.
This not tested! I havn`t this systems.

Thanks.
But my patch 95 is broken, this ideas only. I not tested this.
Quick patch attached, but UNTESTED also.


--w
vodz
diff -rbu busybox.orig/miscutils/crond.c busybox/miscutils/crond.c
--- busybox.orig/miscutils/crond.c 2003-07-21 14:59:34.000000000 +0400
+++ busybox/miscutils/crond.c 2003-07-28 12:56:55.000000000 +0400
@@ -203,8 +203,9 @@
if (!(opt & 4)) {
if(daemon(1, 0) < 0) {
bb_perror_msg_and_die("daemon");
+ }
#if defined(__uClinux__)
- } else {
+ else {
/* reexec for vfork() do continue parent */
vfork_daemon_rexec(ac, av, "-f");
}
diff -rbu busybox.orig/networking/inetd.c busybox/networking/inetd.c
--- busybox.orig/networking/inetd.c 2003-07-21 14:59:53.000000000 +0400
+++ busybox/networking/inetd.c 2003-07-28 12:52:27.000000000 +0400
@@ -832,13 +832,13 @@

#if defined(__uClinux__)
opt = bb_getopt_ulflags(argc, argv, "q:f", &sq);
- if (!(opt & 4)) {
+ if (!(opt & 2)) {
daemon(0, 0);
/* reexec for vfork() do continue parent */
vfork_daemon_rexec(argc, argv, "-f");
}
#else
- opt = bb_getopt_ulflags(ac, av, "q:", &sq);
+ opt = bb_getopt_ulflags(argc, argv, "q:", &sq);
daemon(0, 0);
#endif /* uClinux */

diff -rbu busybox.orig/sysklogd/klogd.c busybox/sysklogd/klogd.c
--- busybox.orig/sysklogd/klogd.c 2003-07-21 15:16:46.000000000 +0400
+++ busybox/sysklogd/klogd.c 2003-07-21 20:45:34.000000000 +0400
@@ -154,7 +154,6 @@
}

if (doFork) {
-#if !defined(__UCLIBC__) || defined(__UCLIBC_HAS_MMU__)
if (daemon(0, 1) < 0)
bb_perror_msg_and_die("daemon");
#if defined(__uClinux__)
_______________________________________________
busybox mailing list
busybox@xxxxxxxxxxxxxxxx
http://codepoet.org/mailman/listinfo/busybox
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise