summaryrefslogtreecommitdiff
path: root/nscd
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@redhat.com>2009-11-24 16:24:59 +0100
committerAndreas Schwab <schwab@redhat.com>2009-11-24 16:24:59 +0100
commit13cada74709e88387c4f086d4042683f86e2e10f (patch)
tree2f264830ff2eab5de6216b6eab2a9206c65dd8d1 /nscd
parent4909e83159d429b1fd9a679c78cba24e610fd5a6 (diff)
parent49c7f27194d16976a6bb9c5b7be186662ec7a6e6 (diff)
Merge remote branch 'origin/master' into fedora/master
Diffstat (limited to 'nscd')
-rw-r--r--nscd/connections.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/nscd/connections.c b/nscd/connections.c
index ca73393f40..69f6533a32 100644
--- a/nscd/connections.c
+++ b/nscd/connections.c
@@ -1426,15 +1426,14 @@ cannot change to old working directory: %s; disabling paranoia mode"),
#endif
/* Try to exec the real nscd program so the process name (as reported
in /proc/PID/status) will be 'nscd', but fall back to /proc/self/exe
- if readlink fails */
+ if readlink or the exec with the result of the readlink call fails. */
ssize_t n = readlink ("/proc/self/exe", pathbuf, sizeof (pathbuf) - 1);
- if (n == -1)
- execv ("/proc/self/exe", argv);
- else
+ if (n != -1)
{
pathbuf[n] = '\0';
execv (pathbuf, argv);
}
+ execv ("/proc/self/exe", argv);
/* If we come here, we will never be able to re-exec. */
dbg_log (_("re-exec failed: %s; disabling paranoia mode"),