From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yu Zhiguo Subject: Re: [PATCH] libxl: execute command by execvp() Date: Wed, 21 Jul 2010 15:11:45 +0800 Message-ID: <4C469DB1.4090203@cn.fujitsu.com> References: <4C4424E6.4050109@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4C4424E6.4050109@cn.fujitsu.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "xen-devel@lists.xensource.com" Cc: Ian Campbell List-Id: xen-devel@lists.xenproject.org Hi Ian, Yu Zhiguo wrote: > execute command by execvp() so can search command in PATH. > It is trivial, but can you ack this fix? Before this fix, when create guest, we must use absolute path for bootloader, e.g. bootloader = "/usr/bin/pygrub". If not in absolute path now, xl create will block in: pid = fork_exec_bootloader(&bootloader_fd, (char *)info->u.pv.bootloader, args); ... while (1) { fifo_fd = open(fifo, O_RDONLY); ------------> here because pygrub cannot be executed so no data will be outputted into this fifo. Yu > Signed-off-by: Yu Zhiguo > > diff -r 12f0618400de -r da4c3756920e tools/libxl/libxl_exec.c > --- a/tools/libxl/libxl_exec.c Fri Jul 16 13:54:44 2010 +0100 > +++ b/tools/libxl/libxl_exec.c Tue Jul 20 02:14:44 2010 +0800 > @@ -53,7 +53,7 @@ > /* in case our caller set it to IGN. subprocesses are entitled > * to assume they got DFL. */ > > - execv(arg0, args); > + execvp(arg0, args); > _exit(-1); > } > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > > >