diff options
| author | David Oberhollenzer <david.oberhollenzer@tele2.at> | 2018-07-22 17:57:13 +0200 | 
|---|---|---|
| committer | David Oberhollenzer <david.oberhollenzer@tele2.at> | 2018-07-22 17:57:20 +0200 | 
| commit | 056d3c8e6481088b8e5d9791d8c1762a3c8d1a83 (patch) | |
| tree | 0b4ad3c59f25171c618e3dca7850544e2d619549 /lib/include | |
| parent | 8718c31928792c5d092eeca3d656924874a38aa1 (diff) | |
Add output truncation flag
This commit adds a "truncate" flag that can be added to a service
description between the "tty" keyword and the path string.
If the flag is set, the output file is truncated to 0 after opening.
This probably requires some remodeling in the future as the tty keyword
no longer deals with just tty devices.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
Diffstat (limited to 'lib/include')
| -rw-r--r-- | lib/include/service.h | 6 | 
1 files changed, 6 insertions, 0 deletions
| diff --git a/lib/include/service.h b/lib/include/service.h index 49c5432..03d768e 100644 --- a/lib/include/service.h +++ b/lib/include/service.h @@ -51,6 +51,11 @@ enum {  	RDSVC_NO_DEPS = 0x08,	/* do not store dependencies */  }; +enum { +	/* truncate stdout */ +	SVC_FLAG_TRUNCATE_OUT = 0x01, +}; +  typedef struct exec_t {  	struct exec_t *next;  	int argc;		/* number of elements in argument vector */ @@ -67,6 +72,7 @@ typedef struct service_t {  	char *desc;		/* description string */  	char *ctty;		/* controlling tty or log file */  	int rspwn_limit;	/* maximum respawn count */ +	unsigned int flags;	/* SVC_FLAG_* bit field */  	/* linked list of command lines to execute */  	exec_t *exec; | 
