On Wed, Apr 28, 2004 at 05:49:30PM -0400, atonns@mail.ivillage.com wrote:
I don't think it's perl, but syslog-ng. What version of syslog-ng are you running? I looked at the source for 'afprogram.c' in both 1.6.2 and the 1.7.0+20040428 where it forks the child to run the program. Using the code as follows, how could you do anything _but_ run /bin/sh -c ...
if (pid == 0) { int fd = open("/dev/null", O_WRONLY);
dup2(msgpipe[0], 0); dup2(fd, 1); dup2(fd, 2); close(fd); close(msgpipe[1]); execl("/bin/sh", "/bin/sh", "-c", self->progname->data, NULL); _exit(127); }
Ok. I don't know why mine is a child of syslog-ng, and it properly terminates when syslog-ng does. We must not be on the same version or something. 1.5.26 here. -- Nate "One only needs two tools in life: WD-40 to make things go, and duck tape to make them stop." - Weilacher, G. M.