daemon 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/daemon.gemspec +2 -2
  3. data/lib/daemon.rb +2 -1
  4. metadata +4 -4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.1.0
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "daemon"
8
- s.version = "1.0.0"
8
+ s.version = "1.1.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jakub Pastuszek"]
12
- s.date = "2011-09-26"
12
+ s.date = "2011-09-28"
13
13
  s.description = "Make calling script to become a daemon with pid file locking support and stdout/stderr redirection"
14
14
  s.email = "jpastuszek@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -5,7 +5,7 @@ class Daemon
5
5
  end
6
6
  end
7
7
 
8
- def self.daemonize(pid_file, log_file = nil)
8
+ def self.daemonize(pid_file, log_file = nil, sync = true)
9
9
  exit if fork
10
10
  Process.setsid # become session leader
11
11
  exit if fork # and exits
@@ -16,6 +16,7 @@ class Daemon
16
16
 
17
17
  if log_file
18
18
  log = File.open(log_file, 'a')
19
+ log.sync = sync
19
20
  else
20
21
  log = '/dev/null'
21
22
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: daemon
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
+ - 1
8
9
  - 0
9
- - 0
10
- version: 1.0.0
10
+ version: 1.1.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jakub Pastuszek
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-09-26 00:00:00 Z
18
+ date: 2011-09-28 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  requirement: &id001 !ruby/object:Gem::Requirement