mirror of
https://github.com/troglobit/finit.git
synced 2026-10-08 16:34:45 +07:00
Follw-up to 4894580, unbreak TTYs
The TTY and log configuration is overloaded using a union in svc_t, so we cannot "reset" the log attribute on reload. In fact, a TTY should never be allowed to have a tty:anything set, so change the parser to ignore log options for ttys. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
+6
-4
@@ -1654,10 +1654,12 @@ int service_register(int type, char *cfg, struct rlimit rlimit[], char *file)
|
||||
parse_script("ready", ready_script, svc->ready_script, sizeof(svc->ready_script));
|
||||
else
|
||||
memset(svc->ready_script, 0, sizeof(svc->ready_script));
|
||||
if (log)
|
||||
parse_log(svc, log);
|
||||
else
|
||||
svc->log.enabled = 0;
|
||||
if (!svc_is_tty(svc)) {
|
||||
if (log)
|
||||
parse_log(svc, log);
|
||||
else
|
||||
svc->log.enabled = 0;
|
||||
}
|
||||
if (notify) {
|
||||
int type = parse_notify(notify);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user