-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Precompiling exits early using --inline=no -O0
#16398
Comments
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap11.html#tag_11_01_03 it's unspecified in POSIX whether we will be terminated and unspecified if there's any way to prevent it. There's a chance we can work around this though. |
simpler repro: julia> p = spawn(detach(`./julia -e nothing`), (DevNull, STDOUT, DevNull)) |
hm, it seems there is of course a flag to change this behavior, if we don't like it: diff --git a/src/unix/tty.c b/src/unix/tty.c
index 32fa37e..3727a83 100644
--- a/src/unix/tty.c
+++ b/src/unix/tty.c
@@ -87,7 +87,7 @@ int uv_tty_init(uv_loop_t* loop, uv_tty_t* tty, int fd, int readable) {
* slave device.
*/
if (uv__tty_is_slave(fd) && ttyname_r(fd, path, sizeof(path)) == 0)
- r = uv__open_cloexec(path, O_RDWR);
+ r = uv__open_cloexec(path, O_RDWR | O_NOCTTY);
else
r = -1; (adding regression flag since this code path was not present in the v0.4 releases) |
Some of the tests rely on a detach process getting its own controlling terminal. |
Which ones? That sounds like a bug in the test. |
Since this re-open logic is supposed to be transparent to the parent program, this flag helps ensure that there are no unintended side-effects. This flag is already the default (and only possible option) on FreeBSD. Normally, Linux will also act as if you passed NOCTTY. However, it appears that mac OS sometimes strips the parent process of its controlling terminal if you don't pass this flag. Fixes: libuv#973 Fixes: JuliaLang/julia#16398
Since this re-open logic is supposed to be transparent to the parent program, this flag helps ensure that there are no unintended side-effects. This flag is already the default (and only possible option) on FreeBSD. Normally, Linux will also act as if you passed NOCTTY. However, it appears that mac OS sometimes strips the parent process of its controlling terminal if you don't pass this flag. Fixes: #973 Fixes: JuliaLang/julia#16398 PR-URL: #2619 Reviewed-By: Ben Noordhuis <[email protected]>
E.g.:
The text was updated successfully, but these errors were encountered: