yarn upgrade from 1.10 to 1.12 breaks SIGINT

Do you want to request a feature or report a bug?

What is the current behavior?
I’m using a yarn start script based on ts-node which invokes angular-cli as a child process via cross-spawn. When I was on yarn 1.10 everything works great when I kill that script using Ctrl+C -> SIGINT the child-process gets killed along with it.

Since I am on 1.12, all of a sudden the child procees keeps on living after Ctrl+C -> SIGINT. When I kill it, I see this interesting output

✘-INT ~/dev/mc/meshfed-release/panel [develop|●1⚑ 7] 
16:54 $ killall ng
/tmp/yarn--1541000763493-0.12858294663468484/node: line 3: 13473 Terminated              "/usr/bin/node" "$@"

If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?
Yarn should exhibit the old (i.e. v1.10) behavior when it comes to forwarding signals to package.json scripts. The child process spawned by my script should be properly killed in response to a Ctrl+C -> SIGINT signal.

Please mention your node.js, yarn and operating system version.
yarn 1.12.1
Fedora 28
node 8.12.0

Author: Fantashit

1 thought on “yarn upgrade from 1.10 to 1.12 breaks SIGINT

  1. I stumbled upon this problem my self.

    The issue happened during the pnp implementation when makePortableProxyScriptUnix was introduced ( @arcanis ). The portable proxy script should execute the command (i.e /usr/bin/node) using “exec” in order to replace the currently running shell and let signals pass through.

    The way it is now, the portable script runs node in another process thus having signals being delivered to the top process (portable script) and not to the actual node process

Comments are closed.