-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Process.start could have a mode that replaces current process with the started one. #41966
Comments
See also: #42092 |
Hey all, at the risk of digging up an old issue, I wanted to share my thoughts on this. I think that allowing Dart to replace itself with another process would open up using Dart to a new class of CLI programs, specifically "process launchers". I am currently looking at different languages to reimplement I thought using I guess I'm looking for something like |
Perhaps exec can be called via ffi nowadays... |
That's an interesting idea. I haven't done any C in a while though. Do you know which |
I guess you can choose from one of these depending on how you want to pass the arguments: https://en.wikipedia.org/wiki/Exec_(system_call)#Unix,_POSIX,_and_other_multitasking_systems However I'm not sure how easy it is to close file descriptors before the call: Someone from the VM team will know a lot more. Eg. @mkustermann |
Agreed - that may work (modulo #38832).
IIRC the VM open all files with |
Similar to exec in posix.
This would make signal handling more consistent if the spawning process is there as a script to run another program, also it might save memory.
This came up in the context of
pub run
(dart-lang/pub#2492) that wants to start the program in a subprocess, and let that subprocess handle signals without interference frompub run
.The text was updated successfully, but these errors were encountered: