mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 19:23:49 -05: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"
|
logger.log process: child.pid, kill_error: error, "error killing process"
|
||||||
, options.timeout
|
, options.timeout
|
||||||
|
|
||||||
child.on 'exit', (code, signal) ->
|
child.on 'close', (code, signal) ->
|
||||||
cleanup signal
|
err = if code then new Error("exit status #{code}") else signal
|
||||||
|
cleanup err
|
||||||
|
|
||||||
child.on 'error', (err) ->
|
child.on 'error', (err) ->
|
||||||
cleanup err
|
cleanup err
|
||||||
|
|
Loading…
Reference in a new issue