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
double forking for process spawning #6828
Comments
Also this patch removes syncronous calls to read/write/waitpid, increasing responsiveness of process starting(not much, of course). |
I am not a sway developer, but I think this feature is absolutely critical.
|
My patch is VERY preliminary. I will fix all patch problems, but, honestly, first I want to get OK/NOT OK for the idea behind patch, from sway devs :) |
posix_spawn() perfectly OK from my point of view, and even better than fork() + exec(). vfork() is a "no go" in new code, actually. |
Double-forking is used to avoid all of the SIGCHLD issues. I'd rather not change it. -1 for |
Can you please explain about this issues with SIGCHILD? I have run my patch for weeks now, and does not have any issues...
Can I do anything to change your mind? I see this as non-breaking change for most users, but some of us, who wants to see completely supervised tree in pstree(for example) will benefit from this. |
I have no strong opinion here, but you should know, that posix_spawn is technically superior:
|
+1, im curious for this behaviour. |
Any chance to progress here? |
Personally i just wrapped sway in a subreaper to get the functionality. |
Very interesting, i'll try it. |
Yes, this subreaper approach actually works, https://github.com/pg83/mix/blob/main/pkgs/bin/subreaper/mix.sh But, personally, I will prefer a proper solution in sway, if this is possible at all :) |
@emersion any comments, please? |
Sorry, I don't have time to look into this atm. |
It's quite complicated to implement properly -- the following patch is maybe 30% of the necessary effort -- but in theory it is not required, in the fork-setsid-fork-exec method of process spawning, that the first process (which calls |
Hi.
Currently sway uses double-forking for its process spawning, for example, in exec_always.c.
The text was updated successfully, but these errors were encountered: