Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 71050 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]
pidfile-3.1.0.patch - a patch for a pidfile
pidfile-3.1.0.patch (text/plain), 1.20 KB, created by
Jordan Clark
on 2005-10-19 15:59:03 UTC
(
hide
)
Description:
pidfile-3.1.0.patch - a patch for a pidfile
Filename:
MIME Type:
Creator:
Jordan Clark
Created:
2005-10-19 15:59:03 UTC
Size:
1.20 KB
patch
obsolete
>A patch that makes collectd create a PID file /var/run/collectd.pid > ># ># Patch managed by http://www.holgerschurig.de/patcher.html ># > >--- collectd-3.1.0/src/collectd.c~pidfile-3.1.0 >+++ collectd-3.1.0/src/collectd.c >@@ -22,6 +22,8 @@ > time_t curtime; > int operating_mode; > >+#define PID_PATH "/var/run/collectd.pid" >+ > void sigIntHandler (int signal) > { > loop++; >@@ -136,6 +138,9 @@ > > plugin_init_all (); > >+ if (create_pidfile ()) >+ exit (2); >+ > while (loop == 0) > { > curtime = time (NULL); >@@ -163,6 +168,9 @@ > char *instance; > char *values; > >+ if (create_pidfile ()) >+ exit (2); >+ > while (loop == 0) > { > if (multicast_receive (&host, &type, &instance, &values) == 0) >@@ -177,6 +185,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 +350,8 @@ > */ > 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