Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of git@github.com:rails/rails
- Loading branch information
Showing
16 changed files
with
320 additions
and
241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
require 'active_support/core_ext/process/daemon' |
25 changes: 25 additions & 0 deletions
25
activesupport/lib/active_support/core_ext/process/daemon.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
if RUBY_VERSION < "1.9" | ||
module Process | ||
def self.daemon(nochdir = nil, noclose = nil) | ||
exit if fork # Parent exits, child continues. | ||
Process.setsid # Become session leader. | ||
exit if fork # Zap session leader. See [1]. | ||
|
||
unless nochdir | ||
Dir.chdir "/" # Release old working directory. | ||
end | ||
|
||
File.umask 0000 # Ensure sensible umask. Adjust as needed. | ||
|
||
unless noclose | ||
STDIN.reopen "/dev/null" # Free file descriptors and | ||
STDOUT.reopen "/dev/null", "a" # point them somewhere sensible. | ||
STDERR.reopen '/dev/null', 'a' | ||
end | ||
|
||
trap("TERM") { exit } | ||
|
||
return 0 | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
a08004a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Koz, As I understand things, these “Merge branch ‘master’” commits can be avoided if you git-fetch && git-rebase instead of git-pull. git-pull calls merge instead of rebase by default, but can be told to rebase instead with the —rebase option.
More info:
http://lists.freedesktop.org/archives/xorg/2006-November/019737.html
I ran into a similar issue with my repos. I’m thinking of using aliases to help:
alias gl=“git pull”
alias glr=“git pull —rebase”
More info on rebase vs merge (I’m still trying to grok all of this myself):
http://kerneltrap.org/mailarchive/git/2007/10/27/361274