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:
Joachim Wiberg
2023-02-06 15:47:19 +01:00
parent 48e1a0b17f
commit 4f8a5a6531
+6 -4
View File
@@ -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);