lkml.org 
[lkml]   [2003]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: chroot() breaks syslog() ?
Date
> 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/

\
 
 \ /
  Last update: 2005-03-22 13:47    [W:0.039 / U:0.908 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site