If your Procfile lists a Ruby process, no output from it will be shown until you use Ctrl+C to stop foreman, at which point you see everything that should have been shown before.
I've looked into this a bit, and the problem relates to using IO.select in the engine. It's supposed to return a list of the processes that are ready to be read from, but for some reason, it excludes the ruby process until foreman starts shutting down.
Changing the timeout in the IO.select call to 1 does not help; it still returns nil every time.
Minimal test case:
Procfile:
rb: ruby -e 'loop { puts Time.now; sleep 1 }'
Run:
$ foreman start
16:55:40 rb.1 | started with pid 5755
^C16:55:44 system | SIGINT received, starting shutdown
16:55:44 rb.1 | -e:1:in `sleep': Interrupt
16:55:44 rb.1 | from -e:1:in `block in <main>'
16:55:44 rb.1 | from -e:1:in `loop'
16:55:44 rb.1 | from -e:1:in `<main>'
16:55:44 rb.1 | 2018-05-22 16:55:40 +1000
16:55:44 rb.1 | 2018-05-22 16:55:41 +1000
16:55:44 rb.1 | 2018-05-22 16:55:42 +1000
16:55:44 rb.1 | 2018-05-22 16:55:43 +1000
16:55:44 rb.1 | 2018-05-22 16:55:44 +1000
16:55:45 system | sending SIGTERM to all processes
16:55:45 rb.1 | terminated by SIGINT
If your
Procfile
lists a Ruby process, no output from it will be shown until you use Ctrl+C to stop foreman, at which point you see everything that should have been shown before.I've looked into this a bit, and the problem relates to using
IO.select
in the engine. It's supposed to return a list of the processes that are ready to be read from, but for some reason, it excludes theruby
process until foreman starts shutting down.Changing the timeout in the
IO.select
call to1
does not help; it still returnsnil
every time.Minimal test case:
Procfile
:Run:
My system: