-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add 'detached process' option #6
Comments
Hi studoot, This may indeed be a useful feature, but I don't think "detached" is a good name for this process option because it will create ambiguity with the nes::process proc{..., nes::process_options::detached};
//Do I need to call detach or join ? humm Since it is not implementable on most other systems ("console app" is a windows only concept afaik), maybe we can add it as an extension and name it "win32_detached" or something that to relieve this ambiguity and clearly mark it as a platform specific feature. And if we do this then give it a higher value to prevent future potential enum conflict, like |
Yes, that all sounds good - I'll implement those changes and create the PR. |
Qt calls it detached process too "QProcess::spawnDetached", and it also means that the process becomes the leader of its own process group (CREATE_NEW_PROCESS_GROUP on Windows, fork + setsid + posix_spawn on Posix). |
I've recently had need of a detached process on Windows (i.e. it doesn't open a new console window) while using
not-enough-standards
.I implemented this by adding a
detached
flag toprocess_options
and processing it in the Windows implementation of the relevantprocess
constructor (here's the commit in my fork).This is a feature that I think Winows programmers would find useful and I'm quite happy to create a PR for this. I'm not sure that Linux has an equivalent need (I'm not particularly experienced with Linux, though), in which case
detached
would be a no-op. If you had other suggestions, please let me know.The text was updated successfully, but these errors were encountered: