Messages in this thread | | | From | Steven Micallef <> | Subject | RE: chroot() breaks syslog() ? | Date | Mon, 4 Aug 2003 17:30:34 +1000 |
| |
> consider syslogd's -a option. Or simply call openlog(3) with > LOG_NDELAY before > chroot(). Or place the first call to syslog() before > chroot(). Syscall() does > not close the socket between calls. > > int main(void) { > openlog( "klaus", LOG_NDELAY, LOG_NEWS); > chroot("/tmp"); > printf( "before\n" ); fflush( stdout ); > syslog(LOG_ALERT, "TEST1"); > printf( "between\n" ); fflush( stdout ); > syslog(LOG_ALERT, "TEST2"); > }
That works perfectly, thanks.
Regards,
Steve. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |