]> git.ipfire.org Git - thirdparty/util-linux.git/blame - login-utils/simpleinit.h
Imported from util-linux-2.10s tarball.
[thirdparty/util-linux.git] / login-utils / simpleinit.h
CommitLineData
22853e4a
KZ
1#include <limits.h>
2#include <errno.h>
3
4
5#define ERRSTRING strerror (errno)
6#define COMMAND_SIZE (PIPE_BUF - 4)
7
8
9#define COMMAND_TEST 0 /* No wait, signal */
10#define COMMAND_NEED 1 /* Wait, signal */
11#define COMMAND_ROLLBACK 2 /* Wait, signal */
12#define COMMAND_DUMP_LIST 3 /* No wait, no signal */
66ee8158 13#define COMMAND_PROVIDE 4 /* Wait, signal */
22853e4a
KZ
14
15#define SIG_PRESENT SIGUSR1 /* Service is available */
16#define SIG_STOPPED SIGUSR1 /* Service was stopped OK */
17#define SIG_NOT_PRESENT SIGUSR2 /* Not present, but that's OK */
18#define SIG_FAILED SIGPOLL /* Startup failed */
19#define SIG_NOT_STOPPED SIGPOLL /* Failed to stop */
66ee8158 20#define SIG_NOT_CHILD SIGPOLL /* Not a child of init */
22853e4a
KZ
21
22struct command_struct /* Must always be COMMAND_SIZE */
23{
24 signed int command;
25 pid_t pid;
66ee8158 26 pid_t ppid;
22853e4a
KZ
27 char name[1];
28};