[lxc-devel] [PATCH] lxc-monitord: remove hard code execvp path of lxc-monitord

Rui Xiang rui.xiang at huawei.com
Sat Jun 8 10:04:47 UTC 2013


Sometimes, the path of lxc tools is not '/usr/bin', but
'/usr/local/bin' or other. Then execvp lxc-monitord will fail
in lxc_monitord_spawn.

Signed-off-by: Rui Xiang <rui.xiang at huawei.com>
---
 src/lxc/monitor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lxc/monitor.c b/src/lxc/monitor.c
index c04bb73..0717344 100644
--- a/src/lxc/monitor.c
+++ b/src/lxc/monitor.c
@@ -210,7 +210,7 @@ int lxc_monitord_spawn(const char *lxcpath)
 	char pipefd_str[11];
 
 	char * const args[] = {
-		"/usr/bin/lxc-monitord",
+		"lxc-monitord",
 		(char *)lxcpath,
 		pipefd_str,
 		NULL,
-- 
1.8.2.2





More information about the lxc-devel mailing list