Teonet library
0.4.7
|
Go to the source code of this file.
Functions | |
void | init_pidfile (int port) |
Create the pid file name. More... | |
void | kill_pidfile () |
Free the pid file name. More... | |
int | write_pidfile () |
Write current pid to the all pidfiles. More... | |
void | read_pidfile (int *port_pid) |
Read current pid from the all pidfiles. More... | |
int | check_pid (int pid) |
Search for process with pid. More... | |
void | remove_pidfile () |
Remove the pid files. More... | |
int check_pid | ( | int | pid | ) |
void init_pidfile | ( | int | port | ) |
Create the pid file name.
port | Port number |
References EXE_NAME, free(), GET_PIDFILE_DIR, malloc(), PIDFILE_EX, and PIDFILE_NAME_LEN.
Referenced by start_stop_daemon().
void kill_pidfile | ( | ) |
void read_pidfile | ( | int * | port_pid | ) |
Read current pid from the all pidfiles.
port_pid |
References _read_pidfile().
Referenced by start_stop_daemon().
void remove_pidfile | ( | ) |
Remove the pid files.
Referenced by start_stop_daemon().
int write_pidfile | ( | ) |
Write current pid to the all pidfiles.
References _write_pidfile(), and result.
Referenced by start_stop_daemon().