LibDap
This library contains the basic modules that are used in the products of the family DAP
|
#include <stdio.h>
#include <sys/types.h>
#include <signal.h>
#include "dap_process_manager.h"
#include "../dap_common.h"
Macros | |
#define | LOG_TAG "dap_process_manager" |
Functions | |
bool | is_process_running (pid_t pid) |
is_process_running Check whether the process is running More... | |
bool | save_process_pid_in_file (const char *file_path) |
save_process_pid_in_file Saves process pid into file by file_path More... | |
pid_t | get_pid_from_file (const char *file_path) |
get_pid_from_file File must consist only PID. Return 0 if file is clear. More... | |
bool | daemonize_process () |
daemonize_process Demonizes current process and exit from program More... | |
bool | kill_process (pid_t pid) |
kill_process Sends SIGKILL to process More... | |
#define LOG_TAG "dap_process_manager" |
bool daemonize_process | ( | ) |
daemonize_process Demonizes current process and exit from program
pid_t get_pid_from_file | ( | const char * | file_path | ) |
get_pid_from_file File must consist only PID. Return 0 if file is clear.
[in] | file_path | File path |
bool is_process_running | ( | pid_t | pid | ) |
is_process_running Check whether the process is running
[in] | pid | PID |
bool kill_process | ( | pid_t | pid | ) |
kill_process Sends SIGKILL to process
[in] | pid |
bool save_process_pid_in_file | ( | const char * | file_path | ) |
save_process_pid_in_file Saves process pid into file by file_path
[in] | file_path | File path |
Saves process pid into file by file_path. If file exists he will be overwritten