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

Error shown when triggering a sigint during shelljs.exec if process.on sigint is defined #254

Closed
pajtai opened this issue Nov 14, 2015 · 5 comments
Labels
exec fix help wanted low priority

Comments

@pajtai
Copy link

@pajtai pajtai commented Nov 14, 2015

Execute this file to reproduce

#!/usr/bin/env node
'use strict';

process.on('SIGINT', function() { console.log('done'); });
var exec = require('shelljs').exec('sleep 30');

Now press ctr-c before the sleep is done and you get an error like the following:

^Cshell.js: internal error
Error: ENOENT: no such file or directory, open '/var/folders/s1/hl12yyyd0n3djffckxzc8fdm0000gp/T/shelljs_639bf41add87c30b7ccb'
at Error (native)
at Object.fs.openSync (fs.js:584:18)
at Object.fs.readFileSync (fs.js:431:33)
at execSync

@ariporad ariporad added the fix label Jan 9, 2016
@bompi88
Copy link

@bompi88 bompi88 commented Jan 29, 2016

+1

@nfischer
Copy link
Member

@nfischer nfischer commented Jan 30, 2016

Confirmed. I think this has to do with the way we force exec to be synchronous (by writing to temp files)

@cqgao
Copy link

@cqgao cqgao commented Aug 24, 2016

+1

@nfischer nfischer added the exec label May 9, 2018
@nfischer
Copy link
Member

@nfischer nfischer commented Jul 11, 2018

I'm going to merge this into #495. The new design won't use tempfiles by default.

@HamidOsouli
Copy link

@HamidOsouli HamidOsouli commented May 3, 2020

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exec fix help wanted low priority
Projects
None yet
Development

No branches or pull requests

6 participants