mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
- we want "w+" for the pidfile open because it may not exist yet
This commit is contained in:
parent
282d153d11
commit
f3ba581fcb
1 changed files with 1 additions and 1 deletions
|
@ -57,7 +57,7 @@ def main(args)
|
|||
|
||||
pidfile = nil
|
||||
if options[:pidfile]
|
||||
pidfile = File.open(options[:pidfile], "r+")
|
||||
pidfile = File.open(options[:pidfile], "w+")
|
||||
gotlock = pidfile.flock(File::LOCK_EX | File::LOCK_NB)
|
||||
if !gotlock
|
||||
owner = pidfile.read()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue