Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 71274 Details for
Bug 107076
app-admin/collectd (new ebuild)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fixed pidfile-3.1.0.patch
pidfile-3.1.0.patch (text/plain), 1.19 KB, created by
George Kargiotakis
on 2005-10-23 05:18:11 UTC
(
hide
)
Description:
fixed pidfile-3.1.0.patch
Filename:
MIME Type:
Creator:
George Kargiotakis
Created:
2005-10-23 05:18:11 UTC
Size:
1.19 KB
patch
obsolete
>--- src/collectd.c 2005-10-23 15:12:15.000000000 +0300 >+++ src/collectd.c 2005-10-23 15:11:37.000000000 +0300 >@@ -16,6 +16,8 @@ > int num_pinghosts = 0; > #endif > >+#define PID_PATH "/var/run/collectd.pid" >+ > /* > * exported variables > */ >@@ -133,7 +135,8 @@ > return (-1); > } > #endif >- >+ if (create_pidfile ()) >+ exit (2); > plugin_init_all (); > > while (loop == 0) >@@ -163,6 +166,9 @@ > char *instance; > char *values; > >+ if (create_pidfile ()) >+ exit (2); >+ > while (loop == 0) > { > if (multicast_receive (&host, &type, &instance, &values) == 0) >@@ -177,6 +183,24 @@ > return (0); > } > >+int create_pidfile (void) >+{ >+ FILE *fh = fopen (PID_PATH, "w"); >+ if (!fh) >+ { >+ syslog (LOG_ERR, "fopen (pidfile): %s", strerror (errno)); >+ return 1; >+ } >+ fprintf(fh, "%d\n", getpid()); >+ fclose(fh); >+ return 0; >+} >+ >+int remove_pidfile (void) >+{ >+ return unlink (PID_PATH); >+} >+ > int main (int argc, char **argv) > { > struct sigaction sigIntAction, sigChldAction; >@@ -324,6 +348,7 @@ > */ > syslog (LOG_INFO, "Exiting normally"); > closelog (); >+ remove_pidfile(); > > return (0); > }
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 107076
:
69154
|
69155
|
69156
|
69157
|
69171
|
69172
|
70664
|
70665
|
70667
|
71047
|
71048
|
71049
|
71050
|
71051
|
71274
|
72852
|
72853
|
74995
|
74996
|
74997
|
74998
|
74999
|
75109
|
75110
|
78563
|
78564
|
78565
|
78566
|
78567
|
79018
|
111075
|
111077
|
111079
|
123746
|
123749
|
146843
|
146845
|
146846
|
148498
|
150796
|
162497
|
162499
|
162500
|
162502
|
162586
|
217235
|
217390
|
241023