| libinfinoted-plugin-manager-0.6 Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
#include <infinoted/infinoted-util.h> gboolean infinoted_util_create_dirname (const gchar *path,GError **error); void infinoted_util_set_errno_error (GError **error,int save_errno,const char *prefix); void infinoted_util_daemon_set_global_pid_file_proc (void); void infinoted_util_daemon_set_local_pid_file_proc (void); int infinoted_util_daemon_pid_file_kill (int sig);
This section contains a few helper functions that are used in the infinoted implementation and are exposed to the plugin interface for convenience of plugin developers.
gboolean infinoted_util_create_dirname (const gchar *path,GError **error);
Creates directories leading to the given path. Does not create a directory for the last component of the path, assuming that it is a filename that you are going to write into that directory later.
void infinoted_util_set_errno_error (GError **error,int save_errno,const char *prefix);
Sets error to save_errno with domain ERRNO_ERROR. If prefix is
non-NULL, prefix is prefixed to error's message, obtained by strerror().
void infinoted_util_daemon_set_global_pid_file_proc
(void);
When attempting to read or write the PID file use the global file.
void infinoted_util_daemon_set_local_pid_file_proc
(void);
When attempting to read or write the PID file use the local file which is in the owner's home directory.
int infinoted_util_daemon_pid_file_kill (int sig);
This is a thin wrapper for daemon_pid_file_kill() which uses
daemon_pid_file_kill_wait() if available with a timeout of 5 seconds.
|
The signal to send to the daemon process. |
Returns : |
0 if the signal was sent or nonzero otherwise. |