-
Notifications
You must be signed in to change notification settings - Fork 28.8k
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
exec
and execSync
git clone private_repo
+ timeout hangs the REPL
#9146
Comments
exec
and execSync
git clone private_repo
+ timeout hangs the processexec
and execSync
git clone private_repo
+ timeout hangs the REPL
Is this a bug report or a help question? If it's the former, can you be explicit about what the actual and expected behavior is? If it's the latter, can you move it to https://github.com/nodejs/help/issues? Thanks. |
@bnoordhuis bug report. I thought it's clear that the process hangs and that shouldn't be expected. I edited to make it clear. |
Okay, thanks. What happens is that the timeout signal terminates /bin/sh but not git. Try adding It's not a node.js bug, just an artifact of the UNIX process model. I'll add documentation labels because it looks like |
Ah, great -- |
I suppose that wouldn't hurt. Consistency is good. |
Hi! I'm still fairly new to contributing, I have technically done a first contribution, but still know nothing. Would anyone mind if I took this on just to go over the documentations and understand the |
Which isn't to say that it wouldn't be more consistent to have |
@jessicaquynh go for it, perhaps you even want to PR a change to allowe .detached with exec? Do you have the ability to test on Windows, to confirm if/how its different? Process model differences can be hard to determine experimentally. /cc @orangemocha Who might know what detached really does on Windows. |
@sam-github Thanks. I will do that, and yup! I have access to Windows! I will get on it. :) |
@sam-github I've opened up a PR for the suggested changes. Although I ran a experimental tests between Windows and Unix, I wasn't able to spot a large difference between what's been documented. I am hoping @orangemocha may be able to clarify. |
@orangemocha isn't around as much anymore. We could try @joaocgreis or @nodejs/platform-windows instead. |
This issue has been inactive for sufficiently long that it seems like perhaps it should be closed. Feel free to re-open (or leave a comment requesting that it be re-opened) if you disagree. I'm just tidying up and not acting on a super-strong opinion or anything like that. |
Expected behavior: REPL resumes working
Actual behavior: Process hangs
Description:
When git cloning a repo that requires entering a username and password in
child_process.exec
orchild_process.execSync
and hitting atimeout
then the program and shell will hang. I've tried this on multiple machines. Here is repro code that uses a private repo of mine (notice how it asks for the username and then the program and shell hangs):Note that if I
pkill node
from another shell then the shell starts working again.The text was updated successfully, but these errors were encountered: