Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding new LOLCOMMITS_FORK (or --fork) option to fork the runner capturing #109

Merged
merged 1 commit into from Jul 8, 2013

Conversation

@matthutchinson
Copy link
Member

matthutchinson commented Jul 3, 2013

Use the LOLCOMMITS_FORK env variable or --fork argument in the lolcommits command to fork the runner capturing process to a new thread.

This helps when the capture is slow and you want to return to a usable terminal prompt right away. Using fork, some plugins may prompt in your terminal after the initial capture. I also updated the README.md to explain this.

This PR is particularly useful for capturing animated gifs!

…uring

Use the LOLCOMMITS_FORK env variable or --fork argument in the lolcommits
command to fork the runner capturing process to a new thread.  Helps when the
capture is slow and you want to return to a usable terminal prompt right away.

Using fork, some plugins may prompt in your terminal after the initial capture.
README also updated to explain this.
@mroth mroth merged commit d25ca19 into lolcommits:master Jul 8, 2013
1 check passed
1 check passed
default The Travis CI build passed
Details
@mroth
Copy link
Member

mroth commented Jul 8, 2013

This has been merged. I added a test in 8fd8f1c to verify it doesn't break capture.

(If you can think of a way to have the test actually verify we background successfully, that would be ideal!)

mroth added a commit that referenced this pull request Jul 8, 2013
@matthutchinson
Copy link
Member Author

matthutchinson commented Jul 8, 2013

Thanks @mroth, I'll look into adding a test for that asap.

@mroth
Copy link
Member

mroth commented Jul 8, 2013

Released to rubygems as part of v0.4.5


def fork_me?(&block)
if Choice.choices[:fork] || ENV['LOLCOMMITS_FORK']
fork { yield block }

This comment has been minimized.

Copy link
@fuadsaud

fuadsaud Jul 8, 2013

Maybe we should redirect STDOUT from within the child process.

@matthutchinson
Copy link
Member Author

matthutchinson commented Jul 19, 2013

👍 going to submit a new PR now to add a better test and deal with the STDOUT issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.