From 7ae124743e94b6f93d92ffc7c599d0ea6d4980af Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 26 Sep 2011 07:51:23 +0000 Subject: 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. --- daemons/clvmd/clvmd-command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'daemons/clvmd/clvmd-command.c') 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"); -- cgit