diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2011-09-26 07:51:23 +0000 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2011-09-26 07:51:23 +0000 |
commit | 7ae124743e94b6f93d92ffc7c599d0ea6d4980af (patch) | |
tree | 8574735bc7282362d97a088f34aa132bf60706a9 /daemons/clvmd/clvmd-command.c | |
parent | 807a5a7b1333bf9fc857ec73c3ec0d827c1064f5 (diff) | |
download | lvm2-7ae124743e94b6f93d92ffc7c599d0ea6d4980af.tar.gz lvm2-7ae124743e94b6f93d92ffc7c599d0ea6d4980af.tar.xz lvm2-7ae124743e94b6f93d92ffc7c599d0ea6d4980af.zip |
Use execvp for clvmd restart
Since execve passed only NULL as environ, we had lost all environment vars on
restart - thus actually running 'different' clvmd then the one at start.
Preserving environ allows to restart clvmd with the same settings
(i.e. LD_LIBRARY_PATH)
Add test for second restart.
Diffstat (limited to 'daemons/clvmd/clvmd-command.c')
-rw-r--r-- | daemons/clvmd/clvmd-command.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/daemons/clvmd/clvmd-command.c b/daemons/clvmd/clvmd-command.c index c1ee673f..6d0506f7 100644 --- a/daemons/clvmd/clvmd-command.c +++ b/daemons/clvmd/clvmd-command.c @@ -418,7 +418,7 @@ static int restart_clvmd(void) for (argc = 1; argv[argc]; argc++) DEBUGLOG("--- %d: %s\n", argc, argv[argc]); /* NOTE: This will fail when downgrading! */ - execve(clvmd, (char **)argv, NULL); + execvp(clvmd, (char **)argv); out: /* We failed */ DEBUGLOG("Restart of clvmd failed.\n"); |