Figured it out. I have to ignore any SIGTTOU signals.
I did that by adding:
signal(SIGTTOU, SIG_IGN);
Before the tcsetpgrp()
call.
More Related Contents:
- Capturing signals in C
- How to Raise SIGTERM in Windows [closed]
- How to avoid using printf in a signal handler?
- What is the difference between sigaction and signal?
- How to prevent SIGPIPEs (or handle them properly)
- How to capture Control+D signal?
- Segmentation fault handling
- What does fflush(stdin) do in C programing? [duplicate]
- How to wait for exit of non-children processes
- popen() alternative
- get process name from process id (win32)
- Printf is not working in C signal handler
- how to exit a child process – _exit() vs. exit
- Signal handling in pthreads
- How to make parent wait for all child processes to finish?
- Print int from signal handler using write or async-safe functions
- Does linux allow any system call to be made from signal handlers?
- Which thread handles the signal?
- Signal queuing in C
- Terminate a process tree (C for Windows)
- get command output in pipe, C for Linux
- What is the difference between fork and thread?
- Checking if errno != EINTR: what does it mean?
- Linux: Why is sig_atomic_t typedef’ed to int?
- executing default signal handler
- How to use sched_getaffinity and sched_setaffinity in Linux from C?
- Oracle Pro*C/OCI install handlers for SIGSEGV/SIGABRT and friends – why, and how to disable?
- Just check status process in c
- Efficient way to find task_struct by pid
- Debugging child process after fork (follow-fork-mode child configured)