Bug 21402

Summary: Linuxulator: getpgid(0) fails
Product: Base System Reporter: Christian Weisgerber <naddy>
Component: kernAssignee: Marcel Moolenaar <marcel>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 5.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Christian Weisgerber 2000-09-19 21:00:01 UTC
Under the Linux syscall compatibility layer, getpgid(0) fails with
ESRCH rather than returning the process group ID of the current
process.

This can be fixed easily in sys/compat/linux/linux_misc.c:linux_getpgid().
However, as far as I can tell, the semantics of getpgid() are
exactly the same for BSD, Linux, and POSIX.  The only functional
difference between our native getpgid() and linux_getpgid() I can
detect is that the latter fails to handle being called with 0.

Therefore I suggest that linux_getpgid() is dropped entirely and
the Linux system call #132 passed on directly to getpgid(), which is
both simpler and more correct.
Comment 1 Johan Karlsson freebsd_committer freebsd_triage 2000-09-19 21:59:42 UTC
Responsible Changed
From-To: freebsd-bugs->marcel

Over to our linuxulator guru.
Comment 2 Marcel Moolenaar freebsd_committer freebsd_triage 2001-09-28 02:41:14 UTC
State Changed
From-To: open->closed

Fixed. Thanks!