Bug 1955 - pidfile contains non-existing process id for a short while after restart
Summary: pidfile contains non-existing process id for a short while after restart
Status: NEW
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: sshd (show other bugs)
Version: 5.9p1
Hardware: All All
: P2 normal
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-07 01:03 AEDT by Petr Lautrbach
Modified: 2011-12-07 01:03 AEDT (History)
0 users

See Also:


Attachments
use synchronization pipes in process daemonize (2.00 KB, patch)
2011-12-07 01:03 AEDT, Petr Lautrbach
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Lautrbach 2011-12-07 01:03:21 AEDT
Created attachment 2115 [details]
use synchronization pipes in process daemonize

sshd calls daemon(3) to daemonize and only after that creates pid file with new process id. Parent process is immediately exited in daemon() so there is non-existent process id in pid file for a short while. This can lead to confusion of checking process which can consider sshd as dead.