mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-26 08:31:22 +00:00
use close event instead of exit to capture stdout/stderr correctly
This commit is contained in:
parent
0e5abe1ff8
commit
63ee4d1e7d
1 changed files with 3 additions and 2 deletions
|
@ -27,8 +27,9 @@ module.exports = (command, options, callback = (err, stdout, stderr) ->) ->
|
|||
logger.log process: child.pid, kill_error: error, "error killing process"
|
||||
, options.timeout
|
||||
|
||||
child.on 'exit', (code, signal) ->
|
||||
cleanup signal
|
||||
child.on 'close', (code, signal) ->
|
||||
err = if code then new Error("exit status #{code}") else signal
|
||||
cleanup err
|
||||
|
||||
child.on 'error', (err) ->
|
||||
cleanup err
|
||||
|
|
Loading…
Reference in a new issue