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. Also. Previous patch for feature request MD5 crypt password for httpd don`t sended to this mailist on 07/15/03 (mailist have Pytom module problem?). The previous patch included, and have testing. --w vodz
This commit is contained in:
parent
4f4631732c
commit
35e643b39f
11 changed files with 336 additions and 266 deletions
27
libbb/vfork_daemon_rexec.c
Normal file
27
libbb/vfork_daemon_rexec.c
Normal file
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* Rexec program for system have fork() as vfork() with foregound option
|
||||
* Copyright (C) Vladminr Oleynik and many different people.
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
#include "libbb.h"
|
||||
|
||||
|
||||
#if defined(__uClinux__)
|
||||
void vfork_daemon_rexec(int argc, char **argv, char *foreground_opt)
|
||||
{
|
||||
char **vfork_args;
|
||||
int a = 0;
|
||||
|
||||
vfork_args = xcalloc(sizeof(char *), argc + 3);
|
||||
while(*argv) {
|
||||
vfork_args[a++] = *argv;
|
||||
argv++;
|
||||
}
|
||||
vfork_args[a] = foreground_opt;
|
||||
execvp("/proc/self/exe", vfork_args);
|
||||
vfork_args[0] = "/bin/busybox";
|
||||
execv(vfork_args[0], vfork_args);
|
||||
bb_perror_msg_and_die("execv %s", vfork_args[0]);
|
||||
}
|
||||
#endif /* uClinux */
|
Loading…
Add table
Add a link
Reference in a new issue