[Bug 264971] tcsetpgrp(3) manpage should mention the relation with SIGTTOU
Date: Fri, 01 Jul 2022 08:37:21 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264971 Bug ID: 264971 Summary: tcsetpgrp(3) manpage should mention the relation with SIGTTOU Product: Documentation Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Manual Pages Assignee: bugs@FreeBSD.org Reporter: bsdpr@phoe.frmug.org CC: doc@FreeBSD.org I recently had some difficulties when trying to use tcsetpgrp(3) from a process trying to bring itself as the foreground process group leader of its controlling terminal. The process got a SIGTTOU sent, that was unexpected as this signal is not mentioned at all in the tcsetpgrp(3) manpage. I eventually found an enlightening mention of this signal and how to handle it in an unanticipated location, the manual of an old release of the SAS/C compiler. "If tcsetpgrp is called from a background process, the signal SIGTTOU is generated, unless the signal is ignored or blocked. If the signal is defaulted, this will cause the calling process to stop. If the signal is handled, tcsetpgrp will set errno to EINTR and fail. For this reason, you should ignore or block SIGTTOU if you call tcsetpgrp from a background process." See https://support.sas.com/documentation/onlinedoc/ccompiler/doc750/html/lr2/zid-9675.htm I think an explanation of the role of SIGTTOU and its usage relative to tcsetpgrp(3) should be added to the manual page as it plays an important role in the correct application of this library function. -- You are receiving this mail because: You are on the CC list for the bug.