Teonet library  0.4.7
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
pidfile.h File Reference

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...
 

Function Documentation

int check_pid ( int  pid)

Search for process with pid.

Parameters
pid
Returns

References FALSE, and TRUE.

Referenced by start_stop_daemon().

void init_pidfile ( int  port)

Create the pid file name.

Parameters
portPort number

References EXE_NAME, free(), GET_PIDFILE_DIR, malloc(), PIDFILE_EX, and PIDFILE_NAME_LEN.

Referenced by start_stop_daemon().

void kill_pidfile ( )

Free the pid file name.

References free().

Referenced by start_stop_daemon().

void read_pidfile ( int *  port_pid)

Read current pid from the all pidfiles.

Parameters
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.

Returns

References _write_pidfile(), and result.

Referenced by start_stop_daemon().