6#ifndef __CRINIT_SDEFS_H__
7#define __CRINIT_SDEFS_H__
12#define CRINIT_SOCKFILE "/run/crinit/crinit.sock"
15#define CRINIT_ENV_NOTIFY_NAME "CRINIT_TASK_NAME"
18#define CRINIT_TASK_STATE_LOADED (0 << 0)
19#define CRINIT_TASK_STATE_STARTING (1 << 0)
20#define CRINIT_TASK_STATE_RUNNING (1 << 1)
21#define CRINIT_TASK_STATE_DONE (1 << 2)
22#define CRINIT_TASK_STATE_FAILED (1 << 3)
23#define CRINIT_TASK_STATE_NOTIFIED (1 << 4)
struct crinitTaskList crinitTaskList_t
struct crinitTaskListEntry crinitTaskListEntry_t
crinitShutdownCmd
Definition crinit-sdefs.h:46
@ CRINIT_SHD_REBOOT
perform a graceful reboot
Definition crinit-sdefs.h:49
@ CRINIT_SHD_POWEROFF
perform a graceful shutdown
Definition crinit-sdefs.h:48
@ CRINIT_SHD_UNDEF
undefined/error value
Definition crinit-sdefs.h:47
unsigned long crinitTaskState_t
Type to store Task state bitmask.
Definition crinit-sdefs.h:17
enum crinitShutdownCmd crinitShutdownCmd_t
Definition crinit-sdefs.h:26
pid_t pid
PID of currently running process subordinate to the task, if any.
Definition crinit-sdefs.h:28
gid_t gid
GID of currently running process subordinate to the task.
Definition crinit-sdefs.h:33
struct timespec createTime
The time the task was created (loaded/parsed).
Definition crinit-sdefs.h:30
struct timespec startTime
The time the task was last started (i.e. first command was spawned).
Definition crinit-sdefs.h:31
char * name
Task name.
Definition crinit-sdefs.h:27
char * groupname
Groupname of currently running process subordinate to the task.
Definition crinit-sdefs.h:36
crinitTaskState_t state
Task state.
Definition crinit-sdefs.h:29
char * username
Username of currently running process subordinate to the task.
Definition crinit-sdefs.h:35
uid_t uid
UID of currently running process subordinate to the task.
Definition crinit-sdefs.h:34
struct timespec endTime
The time the task last ended (i.e. either failed or the last command is done).
Definition crinit-sdefs.h:32
Definition crinit-sdefs.h:40
crinitTaskListEntry_t * tasks
Array of task entries.
Definition crinit-sdefs.h:42
size_t numTasks
Number of elements in the tasks array.
Definition crinit-sdefs.h:41