Skip to content

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

@pajtai

Description

@pajtai

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    execIssues specific to the shell.exec() APIfixBug/defect, or a fix for such a problemhelp wantedlow priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions