Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 28961 Details for
Bug 47365
net-misc/rsync-2.6.0: stderr logging support
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
stderr logging support for rsync-2.6.0
rsync-2.6.0.log-stderr.patch (text/plain), 2.60 KB, created by
Sascha Silbe
on 2004-04-09 10:21:36 UTC
(
hide
)
Description:
stderr logging support for rsync-2.6.0
Filename:
MIME Type:
Creator:
Sascha Silbe
Created:
2004-04-09 10:21:36 UTC
Size:
2.60 KB
patch
obsolete
>diff -Nur rsync-2.6.0/clientserver.c rsync-2.6.0.log-stderr/clientserver.c >--- rsync-2.6.0/clientserver.c 2003-09-11 05:59:57.000000000 +0200 >+++ rsync-2.6.0.log-stderr/clientserver.c 2004-04-09 18:17:04.000000000 +0200 >@@ -587,10 +587,10 @@ > if (is_a_socket(STDIN_FILENO)) { > int i; > >- /* we are running via inetd - close off stdout and >- * stderr so that library functions (and getopt) don't >- * try to use them. Redirect them to /dev/null */ >- for (i=1;i<3;i++) { >+ /* we are running via inetd - close off stdout >+ * so that library functions (and getopt) don't >+ * try to use it. Redirect it to /dev/null */ >+ for (i=1;i<2;i++) { > close(i); > open("/dev/null", O_RDWR); > } >diff -Nur rsync-2.6.0/log.c rsync-2.6.0.log-stderr/log.c >--- rsync-2.6.0/log.c 2003-12-15 09:06:30.000000000 +0100 >+++ rsync-2.6.0.log-stderr/log.c 2004-04-09 18:14:36.000000000 +0200 >@@ -187,12 +187,16 @@ > > void log_open(void) > { >- if (logfname && !logfile) { >- extern int orig_umask; >- int old_umask = umask(022 | orig_umask); >- logfile = fopen(logfname, "a"); >- umask(old_umask); >- } >+ if (logfname && !logfile) { >+ if (strcmp(logfname, "stderr") == 0) { >+ logfile = stderr; >+ } else { >+ extern int orig_umask; >+ int old_umask = umask(022 | orig_umask); >+ logfile = fopen(logfname, "a"); >+ umask(old_umask); >+ } >+ } > } > > void log_close(void) >diff -Nur rsync-2.6.0/rsyncd.conf.5 rsync-2.6.0.log-stderr/rsyncd.conf.5 >--- rsync-2.6.0/rsyncd.conf.5 2004-01-01 19:59:49.000000000 +0100 >+++ rsync-2.6.0.log-stderr/rsyncd.conf.5 2004-04-09 19:12:02.000000000 +0200 >@@ -95,7 +95,7 @@ > The "log file" option tells the rsync daemon to log > messages to that file rather than using syslog\&. This is particularly > useful on systems (such as AIX) where syslog() doesn\&'t work for >-chrooted programs\&. >+chrooted programs\&. Use "stderr" for logging to standard error\&. > .IP > .IP "\fBpid file\fP" > The "pid file" option tells the rsync daemon to write >diff -Nur rsync-2.6.0/rsyncd.conf.yo rsync-2.6.0.log-stderr/rsyncd.conf.yo >--- rsync-2.6.0/rsyncd.conf.yo 2004-01-01 19:59:49.000000000 +0100 >+++ rsync-2.6.0.log-stderr/rsyncd.conf.yo 2004-04-09 19:11:22.000000000 +0200 >@@ -90,7 +90,7 @@ > dit(bf(log file)) The "log file" option tells the rsync daemon to log > messages to that file rather than using syslog. This is particularly > useful on systems (such as AIX) where syslog() doesn't work for >-chrooted programs. >+chrooted programs. Use "stderr" for logging to standard error. > > dit(bf(pid file)) The "pid file" option tells the rsync daemon to write > its process id to that file.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 47365
: 28961 |
28962