-
Notifications
You must be signed in to change notification settings - Fork 431
Re-enable brunch to run in background #998
Comments
@josevalim what was your issue with gh-922? Did it cause any actual harm? |
@paulmillr we need it otherwise if we start brunch from inside another process (using something like popen), it won't ever shutdown if the parent process dies. Most UNIX command line tools behave like that. We could, however, make this or the daemon behaviour configurable. For example, if pass |
Here's the discussion regarding why that was needed: #920 |
So either there is some other way to run a process in the background that doesn't close stdin, or we need to create an option that disables this behavior. |
Since this method of operation is "new" (at least for brunch), perhaps the simplest way to enable it is similar to @josevalim's earlier example: $ cat -
hello
CTRL-D Basically, we'd just add the ability to listen to stdin by using the same |
@shreeve did you try it out and confirm that works for you? Would rather add something to the docs regarding how to do that than add an option. |
I think to support both modes (ie - the original style and also the style suggested by @josevalim), we will need to add an option regardless. In this case, my guess is the simplest option is to allow the if config.read_stdin
process.stdin.on 'end', -> process.exit(0)
process.stdin.resume() and then setting |
Ok now I think I understand your suggestion better. Commander might get in the way of enabling the option by passing the |
It looks like it works with commander.
|
Cool! If you've gone this far, perhaps you'd like to just send a PR? |
👍 for |
Could we also make the option "hidden" by default? To avoid unnecessary confusion. |
Folks, we are close to releasing Phoenix 1.0, so if this is going to change, it would be nice it it was soon. I will send a pull request today. EDIT: s/should/it would be nice :D |
Issue #922 caused brunch to no longer run in the background. We used to run it and be able to press Ctrl+Z and bg to have it run in the background. After #922, we see "stopped" and brunch refuses to run in the background. If we back out #922, everything is cool.
Is there a quick fix for this?
The text was updated successfully, but these errors were encountered: