Class PTYBackgroundProcess
In: lib/background_process/pty_background_process.rb
Parent: BackgroundProcess

Methods

exitstatus   run   select_streams   stderr   wait  

Public Class methods

Runs a subprocess in a pseudo terminal, tricking a program into not buffering its output.

A great write up on pseudo-terminals here: stackoverflow.com/questions/1154846/continuously-read-from-stdout-of-external-process-in-ruby

It has the following disadvantages:

  • You can‘t get the exit status
  • When the process dies, whatever output you haven‘t read yet is lost.
  • stderr is merged into stdout

Public Instance methods

Protected Instance methods

[Validate]