![]() |
Nilorea Library
C utilities for networking, threading, graphics
|
Common function. More...
#include "nilorea/n_common.h"#include "nilorea/n_log.h"#include "nilorea/n_str.h"#include <limits.h>#include <stdio.h>#include <stdlib.h>#include <libgen.h>#include <errno.h>#include <strings.h>#include <unistd.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <sys/wait.h>
Include dependency graph for n_common.c:Go to the source code of this file.
Functions | |
| int | file_exist (const char *filename) |
| test if file exist and if it's readable | |
| int | get_computer_name (char *computer_name, size_t len) |
| abort program with a text | |
| char * | get_prog_dir (void) |
| get current program running directory | |
| char * | get_prog_name (void) |
| get current program name | |
| void | log_environment (int loglevel) |
| log environment variables in syslog | |
| void | n_abort (char const *format,...) |
| abort program with a text | |
| int | n_daemonize (void) |
| Daemonize program. | |
| int | n_daemonize_ex (int mode) |
| Daemonize program. | |
| char * | n_get_file_extension (char path[]) |
| get extension of path+filename | |
| void | N_HIDE_STR (char *buf,...) |
| store a hidden version of a string | |
| int | n_popen (char *cmd, size_t read_buf_size, void **nstr_output, int *ret) |
| launch a command abd return output and status | |
| void | sigchld_handler (int sig) |
| Handles SIGCHLD issues when forking. | |
| int | sigchld_handler_installer () |
| install signal SIGCHLD handler to reap zombie processes | |
| pid_t | system_nb (const char *command, int *infp, int *outfp) |
| Non blocking system call. | |