Age | Commit message (Collapse) | Author |
|
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
|
|
For particularly hostile daemons.
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
|
|
- Cleanly seperate service description parsed from file
from the actual run-time data.
- Remove the use of the signalfd and make asyncronous calls
into the supervisor from signal context work.
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
|
|
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
|
|
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
|
|
With the previous changes, there were only used by the status
command.
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
|
|
- exec_t belongs to service.h, the main place where it is used/needed
- code for executing exec_t is moved to runsvc for the same reason
- what is left are NORETURN and ARRAY_SIZE
- the former can be replaced with direct attribute usage since
the only relevant compilers all support the attribute.
- the later is only used in 3 places and can be trivially replaced
with direct usage of sizeof().
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
|
|
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
|
|
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
|
|
We also want this meachanism to still work for manually started
service (especially after reloading services).
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
|
|
Replace array adhockery with structs and make use of the handy
endianness conversion macros.
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
|
|
- rename init_status_response_t to init_status_t
- merge code for handling it
- fix memory leak in status command
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
|
|
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
|
|
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
|
|
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
|
|
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
|
|
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
|
|
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
|
|
First in rdsvc, tag the services that *do* have exec lines, even if we don't
read them.
Second, if a service does not have that flag set, don't try to execute it.
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
|
|
- mimic format of initd
- skip formatting if not a tty
- distinguish exited because failed vs exited because done
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
|
|
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
|
|
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
|
|
Nothing else uses it.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
|
|
- Do a getline() & process in rdline instead of doing a read per character
and feeding it through a state machine.
- Move splitkv to rdcfg.c, the only place where it is used
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
|
|
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>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
|
|
- Expose rdline_t struct and move a lot of extra processing
to rdline code
- Make line buffer statically allocated
- Simplify rdsvc code
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
|
|
- Common function for splitting string into argument vector
- Preprocess & split command lines while parsing the service file
- Specify "before" and "after" dependencies in a single line
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
|
|
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
|