about summary refs log tree commit diff
path: root/nptl_db
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@redhat.com>2014-03-03 22:51:39 +0530
committerSiddhesh Poyarekar <siddhesh@redhat.com>2014-03-03 23:18:31 +0530
commit532a60357ef4c5852cc1bf836cfd9d6f093ef204 (patch)
treeaaeea80df876694911a2058beec5a8004acebe78 /nptl_db
parentd6285c9f0b3972369356554727b1ede5a6eb0731 (diff)
downloadglibc-532a60357ef4c5852cc1bf836cfd9d6f093ef204.tar.gz
glibc-532a60357ef4c5852cc1bf836cfd9d6f093ef204.tar.xz
glibc-532a60357ef4c5852cc1bf836cfd9d6f093ef204.zip
nscd: Improved support for tracking startup failure in nscd service (BZ #16639)
Currently, the nscd parent process parses commandline options and
configuration, forks on startup and immediately exits with a success.
If the child process encounters some error after this, it goes
undetected and any services started up after it may have to repeatedly
check to make sure that the nscd service did actually start up and is
serving requests.

To make this process more reliable, I have added a pipe between the
parent and child process, through which the child process sends a
notification to the parent informing it of its status.  The parent
waits for this status and once it receives it, exits with the
corresponding exit code.  So if the child service sends a success
status (0), the parent exits with a success status.  Similarly for
error conditions, the child sends the non-zero status code, which the
parent passes on as the exit code.

This, along with setting the nscd service type to forking in its
systemd configuration file, allows systemd to be certain that the nscd
service is ready and is accepting connections.
Diffstat (limited to 'nptl_db')
0 files changed, 0 insertions, 0 deletions