#include "includes.h"
#include "os.h"
Include dependency graph for os_none.c:

Go to the source code of this file.
Functions | |
| void | os_sleep (os_time_t sec, os_time_t usec) |
| Sleep (sec, usec). | |
| int | os_get_time (struct os_time *t) |
| Get current time (sec, usec). | |
| int | os_mktime (int year, int month, int day, int hour, int min, int sec, os_time_t *t) |
| Convert broken-down time into seconds since 1970-01-01. | |
| int | os_daemonize (const char *pid_file) |
| Run in the background (detach from the controlling terminal). | |
| void | os_daemonize_terminate (const char *pid_file) |
| Stop running in the background (remove pid file). | |
| int | os_get_random (unsigned char *buf, size_t len) |
| Get cryptographically strong pseudo random data. | |
| unsigned long | os_random (void) |
| Get pseudo random value (not necessarily very strong). | |
| char * | os_rel2abs_path (const char *rel_path) |
| Get an absolute path for a file. | |
| int | os_program_init (void) |
| Program initialization (called at start). | |
| void | os_program_deinit (void) |
| Program deinitialization (called just before exit). | |
| int | os_setenv (const char *name, const char *value, int overwrite) |
| Set environment variable. | |
| int | os_unsetenv (const char *name) |
| Delete environent variable. | |
| char * | os_readfile (const char *name, size_t *len) |
| Read a file to an allocated memory buffer. | |
| void * | os_zalloc (size_t size) |
| Allocate and zero memory. | |
Alternatively, this software may be distributed under the terms of BSD license.
See README and COPYING for more details.
This file can be used as a starting point when adding a new OS target. The functions here do not really work as-is since they are just empty or only return an error value. os_internal.c can be used as another starting point or reference since it has example implementation of many of these functions.
Definition in file os_none.c.
|
|
Run in the background (detach from the controlling terminal).
|
|
|
Stop running in the background (remove pid file).
|
|
||||||||||||
|
Get cryptographically strong pseudo random data.
|
|
|
Get current time (sec, usec).
|
|
||||||||||||||||||||||||||||||||
|
Convert broken-down time into seconds since 1970-01-01.
|
|
|
Program deinitialization (called just before exit). This function is called just before a program exists. If there are any OS specific processing, e.g., freeing resourced allocated in os_program_init(), it should be done here. It is also acceptable for this function to do nothing. |
|
|
Program initialization (called at start).
|
|
|
Get pseudo random value (not necessarily very strong).
|
|
||||||||||||
|
Read a file to an allocated memory buffer.
|
|
|
Get an absolute path for a file.
|
|
||||||||||||||||
|
Set environment variable.
|
|
||||||||||||
|
Sleep (sec, usec).
|
|
|
Delete environent variable.
|
|
|
Allocate and zero memory.
|
1.4.2