Commit 76aae4fc authored by Jan Rybar's avatar Jan Rybar

pkttyagent: process stopped by SIGTTOU if run in background job

parent 8f0ef129
......@@ -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