You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
setpgid() fails with EPERM if pgid is exited but not reaped (it should succeed) #2786
This is a reduced test case for some behavior that we're seeing in the fish shell. One issue in fish, previous WSL issue which was considered fixed but is not.
fish handles pipeline jobs by making the first process the group leader for all processes in the job, via setpgid. However if the group leader has exited (but not yet been reaped), the setpgid() call fails with EPERM on WSL, where AFAICT it ought to succeed (it does on macOS and Linux).
Tested on Win10 build 16299.rs3_release.170928-1534.
To reproduce: compile and run run.c as cc run.c; ./a.out On WSL this will output some errors and hang. On macOS and Linux it succeeds.
You can simulate fish's ugly workaround by running ./a.out keepalive. This keeps the parent process alive until the child has joined it, which prevents the error.
Activity
therealkenc commentedon Dec 25, 2017
I call this the Rick Grimes problem. Like #1353 (message). From
pson Real Linux:On WSL, zombies die right away.
ridiculousfish commentedon Dec 25, 2017
Brian-Perkins commentedon Jul 11, 2018
This should work better starting in Insider Build 17713
Keep keepalive code under WSL for a while longer