Skip to content
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

SIGWINCH causes process to terminate on Windows #513

Closed
coreh opened this issue Jan 17, 2018 · 3 comments
Closed

SIGWINCH causes process to terminate on Windows #513

coreh opened this issue Jan 17, 2018 · 3 comments
Labels

Comments

@coreh
Copy link

coreh commented Jan 17, 2018

Whenever I resize my terminal on Windows, ts-node terminates with ENOSYS.

Here's a video of it happening:

https://streamable.com/xsoep

That video was recorded while I had v4.0.0 installed, but I've updated to v4.1.0 and even with the detached terminal change, the error still takes place.

The problem seems to be caused by this line:
https://github.com/TypeStrong/ts-node/blob/master/src/bin.ts#L76

I've confirmed it happens on both the integrated VSCode terminal and the native Windows terminal.

coreh added a commit to coreh/ts-node that referenced this issue Jan 17, 2018
rayros added a commit to rayros/ts-node that referenced this issue Feb 9, 2018
internal/child_process.js:409
      throw errnoException(err, 'kill');
      ^
Error: kill ENOSYS
    at _errnoException (util.js:1031:13)
    at ChildProcess.kill (internal/child_process.js:409:13)
    at process.<anonymous> (D:\project\node_modules\ts-node\dist\bin.js:54:93)
    at process.emit (events.js:164:20)
    at Signal.wrap.onsignal (internal/process.js:198:44)
@thasmo
Copy link

thasmo commented Feb 17, 2018

Happens for me too, although it's not a ENOSYS but a EINVAL.

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle @~prestart: @
6 info lifecycle @~start: @
7 verbose lifecycle @~start: unsafe-perm in lifecycle true
8 verbose lifecycle @~start: PATH: C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;P:\PROJECT\node_modules\.bin;C:\Python27\;C:\Python27\Scripts;C:\Program Files\Docker\Docker\Resources\bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\bin;C:\Program Files (x86)\Skype\Phone\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\ProgramData\ComposerSetup\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\HashiCorp\Vagrant\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Go\bin;C:\Program Files\nodejs\;C:\Program Files (x86)\Yarn\bin;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Users\user\Dropbox\Development\PHP\interpreter\7.1;C:\Users\user\AppData\Local\Microsoft\WindowsApps;C:\Users\user\AppData\Roaming\Composer\vendor\bin;C:\Users\user\go\bin;C:\Users\user\AppData\Local\.meteor\;C:\Users\user\AppData\Roaming\npm;C:\Users\user\AppData\Local\Yarn\bin
9 verbose lifecycle @~start: CWD: P:\PROJECT
10 silly lifecycle @~start: Args: [ '/d /s /c', 'ts-node webpack.server.ts' ]
11 silly lifecycle @~start: Returned: code: 1  signal: null
12 info lifecycle @~start: Failed to exec start script
13 verbose stack Error: @ start: `ts-node webpack.server.ts`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:285:16)
13 verbose stack     at EventEmitter.emit (events.js:160:13)
13 verbose stack     at ChildProcess.<anonymous> (C:\Users\user\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:160:13)
13 verbose stack     at maybeClose (internal/child_process.js:943:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
14 verbose pkgid @
15 verbose cwd P:\PROJECT
16 verbose Windows_NT 10.0.16299
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v9.5.0
19 verbose npm  v5.6.0
20 error code ELIFECYCLE
21 error errno 1
22 error @ start: `ts-node webpack.server.ts`
22 error Exit status 1
23 error Failed at the @ start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

@thasmo
Copy link

thasmo commented Feb 17, 2018

Also see nodejs/node#9542.

@blakeembrey
Copy link
Member

Closing with #536 and removing sub-process behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants