Commit 75c8b8af authored by Jan Rybar's avatar Jan Rybar

Merge branch 'pkttyagent-sigttou-if-bg' into 'master'

pkttyagent: process stopped by SIGTTOU if run in background job

See merge request !34
parents 8f0ef129 76aae4fc
......@@ -264,6 +264,12 @@ main (int argc, char *argv[])
memset (&sa, 0, sizeof (sa));
sa.sa_handler = &tty_handler;
/* If tty_handler() resets terminal while pkttyagent is run in background job,
the process gets stopped by SIGTTOU. This impacts systemctl, hence it must
be blocked for a while and then the process gets killed anyway.
sigaddset(&sa.sa_mask, SIGTTOU);
sigaction (SIGTERM, &sa, &savesigterm);
sigaction (SIGINT, &sa, &savesigint);
sigaction (SIGTSTP, &sa, &savesigtstp);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment