-
Notifications
You must be signed in to change notification settings - Fork 859
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setpgid() fails with EPERM if pgid is exited but not reaped (it should succeed) #2786
Comments
This should work better starting in Insider Build 17713 |
mqudsi
added a commit
to mqudsi/fish-shell
that referenced
this issue
Sep 30, 2018
MSFT addressed this in Windows 10 build 17713, but that's not included in any public releases yet, so keep that around for a little while longer. ref microsoft/WSL#2786 ref microsoft/WSL#1353
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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), thesetpgid()
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.The text was updated successfully, but these errors were encountered: