-
Notifications
You must be signed in to change notification settings - Fork 85
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
Have julialauncher
use execve()
instead of launching a new process
#552
Comments
This would be Linux/Mac only, right? I don't think Windows has something like this? And the second question is: right now |
No, I don't think it does, unless @vtjnash knows of a secret
The way I would do it is to have |
I think my primary worry is that this would essentially mean the Windows and Linux/Mac version would be more or less completely different... That doesn't strike me as ideal. I think the exit codes and signal stuff is now handled properly? So I'm not too worried about that. But the gdb thing seems like a real benefit... |
I just had a need for this as well, because NVIDIA's profilers don't seem to like the launch of a child process (and even if they would, they always require specific arguments like let mut child_process = std::process::Command::new(julia_path)
.args(&new_args)
.exec(); ... and that just works with the profilers I was testing. So a vote for using
We could use the |
This seems like a good idea to me as well and I don't think the deviation between Windows and UNIX would be so bad—it could be very contained. Everything is the same right up until the moment of starting the
In both cases you end up with some code running to do background stuff and the only other difference is whether to wait on |
On windows you can pick a parent process and get status on anything, if you care enough to |
Let's have this discussion over here instead of on a tangentially related (closed) issue. @davidanthoff wrote:
I don't want a one process solution—I'm happy to have |
I think we should change
julialauncher
to useexecve()
(or its moral equivalent, wherever possible) instead offork()
when launching thejulia
sub-process. Because this does not launch a child process but instead causes the current process to be replaced by the new process, this would have the following advantages:gdb
naturally followsexec()
calls, whereas withfork()
there's some ambiguity, so it has to be told to follow the child rather than stay with the parent.julia
process, instead of two. (a minor benefit, but still nice)execve()
the rest is on the shoulders of the true julia applicationThe text was updated successfully, but these errors were encountered: