Date: Sat, 16 Jan 1999 11:56:04 -0800 (PST) From: "Kent S. Harris" <ksh@vine.com> To: freebsd-stable@FreeBSD.ORG Subject: setpgid(2) doesn't work as advertised Message-ID: <199901161956.LAA29704@vine.vine.com>
next in thread | raw e-mail | index | archive | help
Perhaps the wrong forum for this, but I'm not a subscriber to freebsd-bugs. The manual page for setpgid(2) is wrong. It claims the target process must either be a child of the invoker OR have the same effective user-id. That is wrong. If the target is not a child of the process, setpgid(2) will return ESRCH (see kern_prot.c). I believe the manual is correct and the kernel code is wrong. Frequently in industrial situations, an "area controller" process on a particular CPU will spawn a number of sub-processes that perform various tasks such as control special devices. One of the tasks of the "area controller" is to reap its children and re-spawn them should they unexpectedly abort. So far no problem. However, in a situation where the "area controller" aborts and is restarted (usually manually), it may want to reclaim its original children to the process group so it can once again reap the SIGCHLD signals. To do so it must insert the children into its new process group via setpgrp. No can do. Comments? - Kent Harris --- Kent S. Harris | http://www.vine.com/ | Networks, WWW Security, Real Vine Technology | mailto:ksh@vine.com | Time Systems, ASIC Modeling, (408)996-1294 | IEEE ACM USENIX | Custom Hardware/Software To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901161956.LAA29704>