Skip to content

Commit bc95015

Browse files
committed
clean up monitor code
1 parent 6b8870e commit bc95015

File tree

1 file changed

+1
-25
lines changed

1 file changed

+1
-25
lines changed

lib/connection/local.coffee

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -37,31 +37,7 @@ module.exports =
3737
@provider().start? paths.jlpath(), client.clargs()
3838
.catch ->
3939

40-
monitorExit: (proc) ->
41-
proc.onExit (code, signal) ->
42-
msg = "Julia has stopped"
43-
if not proc.wrapper and code isnt 0
44-
msg += ": #{code}"
45-
if signal then msg += ", #{signal}"
46-
else
47-
msg += "."
48-
client.info msg
49-
50-
pipeStreams: (proc) ->
51-
out = (data) -> client.stdout data.toString()
52-
err = (data) -> client.stderr data.toString()
53-
proc.flush? out, err
54-
proc.onStdout out
55-
proc.onStderr err
56-
5740
monitor: (proc) ->
58-
proc.ready = -> false
59-
@pipeStreams proc
60-
@monitorExit proc
61-
client.attach proc
62-
proc
63-
64-
monitor2: (proc) ->
6541
client.emitter.emit('boot', proc)
6642
proc.ready = -> false
6743
client.attach(proc)
@@ -92,7 +68,7 @@ module.exports =
9268

9369
proc = check
9470
.then => @spawnJulia(path, args, provider)
95-
.then (proc) => if proc.ty? then @monitor2(proc) else @monitor(proc)
71+
.then (proc) => @monitor(proc)
9672

9773
# set working directory here, so we queue this task before anything else
9874
if provider is 'Remote'

0 commit comments

Comments
 (0)