Pid handling
[ICd internal functions]


Functions

gboolean icd_pid_remove (const char *pidfile)
static gint icd_pid_read (const char *pidfile)
gint icd_pid_check (const char *pidfile)
gboolean icd_pid_write (const char *pidfile)

Function Documentation

gint icd_pid_check ( const char *  pidfile  ) 

Check wheter the process id stored in the pid file exists

Parameters:
pidfile the full pathname of the pid file
Returns:
0 if no pid file is found or no such process is running, otherwise the process id of the existing process

References icd_pid_read(), and icd_pid_remove().

Referenced by main().

static gint icd_pid_read ( const char *  pidfile  )  [static]

Read the process id from the pid file

Parameters:
pidfile the full pathname of the pid file
Returns:
the process id or -1 on error

References icd_pid_remove().

Referenced by icd_pid_check().

gboolean icd_pid_remove ( const char *  pidfile  ) 

Remove process id file

Parameters:
pidfile the full pathname of the pid file
Returns:
TRUE on success, FALSE on failure

Referenced by icd_pid_check(), icd_pid_read(), and main().

gboolean icd_pid_write ( const char *  pidfile  ) 

Write the process id to the pid file

Parameters:
pidfile the full pathname of the pid file
Returns:
TRUE on success, FALSE on failure

Referenced by main().


Generated on Thu Mar 11 09:04:50 2010 for ICd2 by  doxygen 1.5.6