{"action":"created","issue":{"url":"https://api.github.com/repos/shelljs/shelljs/issues/254","labels_url":"https://api.github.com/repos/shelljs/shelljs/issues/254/labels{/name}","comments_url":"https://api.github.com/repos/shelljs/shelljs/issues/254/comments","events_url":"https://api.github.com/repos/shelljs/shelljs/issues/254/events","html_url":"https://github.com/shelljs/shelljs/issues/254","id":116892270,"number":254,"title":"Error shown when triggering a sigint during shelljs.exec if process.on sigint is defined","user":{"login":"pajtai","id":1643937,"avatar_url":"https://avatars.githubusercontent.com/u/1643937?v=3","gravatar_id":"","url":"https://api.github.com/users/pajtai","html_url":"https://github.com/pajtai","followers_url":"https://api.github.com/users/pajtai/followers","following_url":"https://api.github.com/users/pajtai/following{/other_user}","gists_url":"https://api.github.com/users/pajtai/gists{/gist_id}","starred_url":"https://api.github.com/users/pajtai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pajtai/subscriptions","organizations_url":"https://api.github.com/users/pajtai/orgs","repos_url":"https://api.github.com/users/pajtai/repos","events_url":"https://api.github.com/users/pajtai/events{/privacy}","received_events_url":"https://api.github.com/users/pajtai/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/shelljs/shelljs/labels/fix","name":"fix","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-14T03:29:48Z","updated_at":"2016-01-30T01:35:03Z","closed_at":null,"body":"Execute this file to reproduce\r\n\r\n```\r\n#!/usr/bin/env node\r\n'use strict';\r\n\r\nprocess.on('SIGINT', function() { console.log('done'); });\r\nvar exec = require('shelljs').exec('sleep 30');\r\n```\r\n\r\nNow press ctr-c before the sleep is done and you get an error like the following:\r\n\r\n> ^Cshell.js: internal error\r\n> Error: ENOENT: no such file or directory, open '/var/folders/s1/hl12yyyd0n3djffckxzc8fdm0000gp/T/shelljs_639bf41add87c30b7ccb'\r\n>    at Error (native)\r\n>    at Object.fs.openSync (fs.js:584:18)\r\n>    at Object.fs.readFileSync (fs.js:431:33)\r\n>    at execSync\r\n"},"comment":{"url":"https://api.github.com/repos/shelljs/shelljs/issues/comments/177043093","html_url":"https://github.com/shelljs/shelljs/issues/254#issuecomment-177043093","issue_url":"https://api.github.com/repos/shelljs/shelljs/issues/254","id":177043093,"user":{"login":"nfischer","id":5801521,"avatar_url":"https://avatars.githubusercontent.com/u/5801521?v=3","gravatar_id":"","url":"https://api.github.com/users/nfischer","html_url":"https://github.com/nfischer","followers_url":"https://api.github.com/users/nfischer/followers","following_url":"https://api.github.com/users/nfischer/following{/other_user}","gists_url":"https://api.github.com/users/nfischer/gists{/gist_id}","starred_url":"https://api.github.com/users/nfischer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nfischer/subscriptions","organizations_url":"https://api.github.com/users/nfischer/orgs","repos_url":"https://api.github.com/users/nfischer/repos","events_url":"https://api.github.com/users/nfischer/events{/privacy}","received_events_url":"https://api.github.com/users/nfischer/received_events","type":"User","site_admin":false},"created_at":"2016-01-30T01:35:03Z","updated_at":"2016-01-30T01:35:03Z","body":"Confirmed. I think this has to do with the way we force `exec` to be synchronous (by writing to temp files)"}}