Skip to content
This repository has been archived by the owner on Jun 10, 2023. It is now read-only.

Commit

Permalink
Improve logging for debugging, but disabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Feb 1, 2017
1 parent 2cc5278 commit 0bf0b94
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/script-runner-process.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -101,27 +101,30 @@ class ScriptRunnerProcess
@view.setHeader('Running: ' + args.join(' ') + ' (pgid ' + @child.pid + ')')

@view.on 'data', (data) =>
console.log('data', data)
#console.log('view -> pty (data)', data.length)
if @pty?
@pty.master.write(data)

@view.on 'resize', (geometry) =>
#console.log('view -> pty (resize)', geometry)
if @pty?
@pty.resize(geometry.cols, geometry.rows)

@view.focus()

# Handle various events relating to the child process:
@pty.master.on 'data', (data) =>
#console.log('pty -> view (data)', data.length)
if @view?
@view.append(data, 'stdout')

@child.on 'exit', (code, signal) =>
#console.log('pty (exit)', code, signal)

@child = null
@pty.destroy()
@pty = null

console.log('child', 'exit', code, signal)
@endTime = new Date
if @view
duration = ' after ' + ((@endTime - @startTime) / 1000) + ' seconds'
Expand Down

0 comments on commit 0bf0b94

Please sign in to comment.