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

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


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
Copy link

@bompi88 bompi88 commented Jan 29, 2016


Copy link

@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)

Copy link

@cqgao cqgao commented Aug 24, 2016


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

@nfischer nfischer commented Jul 11, 2018

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

Copy link

@HamidOsouli HamidOsouli commented May 3, 2020


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

No branches or pull requests

6 participants