Crinit -- Configurable Rootfs Init
Loading...
Searching...
No Matches
crinitTask Struct Reference

#include <task.h>

Collaboration diagram for crinitTask:
Collaboration graph

Data Fields

char * name
 Name of the task, corresponds to NAME in the config file.
 
crinitTaskCmd_tcmds
 Dynamic array of commands, corresponds to COMMAND[N] in the config file.
 
size_t cmdsSize
 Number of commands in cmds array.
 
crinitTaskCmd_tstopCmds
 Dynamic array of commands, corresponds to STOP_COMMAND[N] in the config file.
 
size_t stopCmdsSize
 Number of commands in stopCmds array.
 
crinitEnvSet_t taskEnv
 Environment variables valid for each COMMAND in this task.
 
crinitEnvSet_t elosFilters
 Elos filter definitions valid for use in dependencies of this task.
 
crinitTaskDep_tdeps
 Dynamic array of dependencies, corresponds to DEPENDS in the config file.
 
size_t depsSize
 Number of dependencies in deps array.
 
crinitTaskDep_ttrig
 Dynamic array of trigger, corresponds to TRIGGER in the config file.
 
size_t trigSize
 Number of trigger in trig array.
 
bool triggered
 Task was triggered (or no trigger where set) and can be run.
 
crinitTaskPrv_tprv
 Dynamic array of provided features, corresponds to PROVIDES in the config file.
 
size_t prvSize
 Number of provided features in prv array.
 
crinitTaskOpts_t opts
 Task options.
 
crinitTaskState_t state
 Task state.
 
pid_t pid
 PID of currently running process subordinate to the task, if any.
 
crinitIoRedir_tredirs
 IO redirection descriptions.
 
size_t redirsSize
 Number of IO redirections.
 
int maxRetries
 
int failCount
 
bool inhibitRespawn
 If task was stopped via user interaction, do not respawn it.
 
struct timespec createTime
 The time the task was created (i.e. has been loaded and parsed).
 
struct timespec startTime
 The time the task last became 'running'.
 
struct timespec endTime
 The time the task last became 'done' or 'failed.
 
uid_t user
 The user id to run the task's commands with.
 
gid_t group
 The group id to run the task's commands with.
 
gid_t * supGroups
 Dynamic array of supplementary group IDs.
 
size_t supGroupsSize
 Number of supplementary group IDs in supGroups.
 
char * username
 The username to run the task's commands with.
 
char * groupname
 The groupname to run the task's commands with.
 

Detailed Description

Type to store a single task.

Field Documentation

◆ cmds

crinitTaskCmd_t* crinitTask::cmds

Dynamic array of commands, corresponds to COMMAND[N] in the config file.

◆ cmdsSize

size_t crinitTask::cmdsSize

Number of commands in cmds array.

◆ createTime

struct timespec crinitTask::createTime

The time the task was created (i.e. has been loaded and parsed).

◆ deps

crinitTaskDep_t* crinitTask::deps

Dynamic array of dependencies, corresponds to DEPENDS in the config file.

◆ depsSize

size_t crinitTask::depsSize

Number of dependencies in deps array.

◆ elosFilters

crinitEnvSet_t crinitTask::elosFilters

Elos filter definitions valid for use in dependencies of this task.

◆ endTime

struct timespec crinitTask::endTime

The time the task last became 'done' or 'failed.

◆ failCount

int crinitTask::failCount

Counts consecutive respawns after failure (see crinitTaskOpts_t::maxRetries). Resets on a successful completion (i.e. all COMMANDs in the task have returned 0).

◆ group

gid_t crinitTask::group

The group id to run the task's commands with.

◆ groupname

char* crinitTask::groupname

The groupname to run the task's commands with.

◆ inhibitRespawn

bool crinitTask::inhibitRespawn

If task was stopped via user interaction, do not respawn it.

◆ maxRetries

int crinitTask::maxRetries

If crinitTask_t::opts includes CRINIT_TASK_OPT_RESPAWN, this variable specifies a maximum consecutive number of respawns after failure (default: -1 for infinite).

◆ name

char* crinitTask::name

Name of the task, corresponds to NAME in the config file.

◆ opts

crinitTaskOpts_t crinitTask::opts

Task options.

◆ pid

pid_t crinitTask::pid

PID of currently running process subordinate to the task, if any.

◆ prv

crinitTaskPrv_t* crinitTask::prv

Dynamic array of provided features, corresponds to PROVIDES in the config file.

◆ prvSize

size_t crinitTask::prvSize

Number of provided features in prv array.

◆ redirs

crinitIoRedir_t* crinitTask::redirs

IO redirection descriptions.

◆ redirsSize

size_t crinitTask::redirsSize

Number of IO redirections.

◆ startTime

struct timespec crinitTask::startTime

The time the task last became 'running'.

◆ state

crinitTaskState_t crinitTask::state

Task state.

◆ stopCmds

crinitTaskCmd_t* crinitTask::stopCmds

Dynamic array of commands, corresponds to STOP_COMMAND[N] in the config file.

◆ stopCmdsSize

size_t crinitTask::stopCmdsSize

Number of commands in stopCmds array.

◆ supGroups

gid_t* crinitTask::supGroups

Dynamic array of supplementary group IDs.

◆ supGroupsSize

size_t crinitTask::supGroupsSize

Number of supplementary group IDs in supGroups.

◆ taskEnv

crinitEnvSet_t crinitTask::taskEnv

Environment variables valid for each COMMAND in this task.

◆ trig

crinitTaskDep_t* crinitTask::trig

Dynamic array of trigger, corresponds to TRIGGER in the config file.

◆ triggered

bool crinitTask::triggered

Task was triggered (or no trigger where set) and can be run.

◆ trigSize

size_t crinitTask::trigSize

Number of trigger in trig array.

◆ user

uid_t crinitTask::user

The user id to run the task's commands with.

◆ username

char* crinitTask::username

The username to run the task's commands with.


The documentation for this struct was generated from the following file: