-
Notifications
You must be signed in to change notification settings - Fork 250
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
kill does not work anymore with latest releases (0.7.5, 0.7.6) #206
Comments
Probably this PR causes issue: #169 |
Thoughts @Daniel-Abrecht @jerch? |
After analyzing the problem further, it turned out that the ioctl returned an EINVAL error. After looking at the linux kernel sources, I figured out that linux only allows this ioctl for SIGINT, SIGQUIT and SIGTSTP: https://github.com/torvalds/linux/blob/master/drivers/tty/pty.c#L211 I've only ever tried sending SIGINT or SIGQUIT, so I never noticed this problem before. I'll start working on a patch to check if pty.kill throws an error and call process.kill in that case tomorrow evening, it's already really late in my timezone. Sorry for the inconvenience. |
Thank you Daniel for investigating this. Let me know as soon as patch is available so I could try out it also. |
Ah yes, linux support for the pty process group signal is still pretty new, seems they did not implement it for all signal types. Since the doc for this ioctl is not existing at all it is hard to say why they went with those signals and left the others out. Regarding the problem at hand - should we add an optional argument to |
@jerch like this? kill(signal?: string, sendToProcessGroup?: boolean): void; Seems reasonable. |
I've created a pull request. Please test if everything works again. Someone also needs to try if the windows version still compiles, since I don't have a windows pc to try that. |
Fix seems to help, thanks @Daniel-Abrecht. @Tyriar can we get this in patch release soon ? |
Any news when we get release ? |
@jupe chatting with legal about CLA issues, I recommend sticking with 0.7.4 in the meantime. |
I reverted the offending change 7360eb7 |
Environment details
Issue description
ptyProcess.kill()
does not have affect anymore.Reproducing easily by spawning
sleep 10
:Above script kill directly when using node-pty@v0.7.4, but latest releases waits until sleep is done unexpectedly.
The text was updated successfully, but these errors were encountered: