195 |
|
|
196 |
/** |
/** |
197 |
* Create a program's pidfile - Such a file is created when in daemon |
* Create a program's pidfile - Such a file is created when in daemon |
198 |
* mode. The file is created with mask = PIDMASK (usually 644). |
* mode. The file is created with mask = MYPIDMASK (usually 644). |
199 |
* @param pidfile The name of the pidfile to create |
* @param pidfile The name of the pidfile to create |
200 |
* @return TRUE if the file was created, otherwise FALSE. |
* @return TRUE if the file was created, otherwise FALSE. |
201 |
*/ |
*/ |
205 |
|
|
206 |
ASSERT(pidfile); |
ASSERT(pidfile); |
207 |
|
|
208 |
umask(PIDMASK); |
umask(MYPIDMASK); |
209 |
|
|
210 |
if ((F= fopen(pidfile,"w")) == (FILE *)NULL) { |
if ((F= fopen(pidfile,"w")) == (FILE *)NULL) { |
211 |
|
|