From: Blaisorblade <blaisorblade@yahoo.it>
To: user-mode-linux-devel@lists.sourceforge.net
Cc: Mattia Dongili <malattia@linux.it>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Jeff Dike <jdike@addtoit.com>
Subject: Re: [uml-devel] [RFC][PATCH] include /usr/lib/uml in PATH
Date: Tue, 4 Apr 2006 02:39:44 +0200 [thread overview]
Message-ID: <200604040239.45495.blaisorblade@yahoo.it> (raw)
In-Reply-To: <20060402195409.GA3695@inferi.kami.home>
On Sunday 02 April 2006 21:54, Mattia Dongili wrote:
> On Sun, Apr 02, 2006 at 08:29:12PM +0200, Geert Uytterhoeven wrote:
> > On Sun, 2 Apr 2006, Mattia Dongili wrote:
>
> [...]
>
> > > --- a/arch/um/os-Linux/helper.c 2006-04-02 16:32:38.340801686 +0200
> > > +++ b/arch/um/os-Linux/helper.c 2006-04-02 16:34:13.454745936 +0200
> > > @@ -22,6 +22,9 @@ struct helper_data {
> > > int fd;
> > > };
> > >
> > > +/* PATH variable to find uml helpers installed in FHS compliant
> > > locations */ +static char *alt_path =
> > > "PATH=:/bin:/usr/bin:/usr/lib/uml";
> >
> > ^
> > Woops, this puts the current directory first in your path, which is
> > probably
>
> Urgh! that was just the default path straight from the execle manpage.
> The attached patch reimplements the thing appending /usr/lib/uml only
> once before starting UML. Still using the above PATH if no PATH variable
> exists as execle behaves in the same way.
Thanks for the patch, we'll possibly apply it, but we need to reimplement (or
copy and fix from glibc) a two-phase execvp(). I've not done it because I've
felt unconfortable with the idea but it's the better I could think of for
now.
In practice, we must avoid any memory allocation after a fork or clone on the
host, because we use the kernel allocator and after a fork() it can't be
used.
I'm unsure whether using the libc allocator would work in that case but mixing
two memory allocators is something I'd never do unless impossible to avoid
(and indeed, the current code does that and I haven't many ideas; however,
int this case it can be avoided, by performing the PATH lookup before the
fork()).
However, probably the patch can be merged anyway, or at least its idea...
*) I'd agree with Geert, but you're indeed correct for that...
*) Saying "19" gets a "NO".
#define UML_LIB_PATH ":/usr/lib/uml"
19 -> strlen(UML_LIB_PATH)
in snprintf, "PATH=%s:/usr/lib/uml" -> "PATH=%s" UML_LIB_PATH
(using string literal concatenation)
--
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade
___________________________________
Yahoo! Messenger with Voice: chiama da PC a telefono a tariffe esclusive
http://it.messenger.yahoo.com
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next prev parent reply other threads:[~2006-04-04 0:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-02 17:34 [uml-devel] [RFC][PATCH] include /usr/lib/uml in PATH Mattia Dongili
2006-04-02 18:29 ` Geert Uytterhoeven
2006-04-02 19:54 ` Mattia Dongili
2006-04-04 0:39 ` Blaisorblade [this message]
2006-04-05 21:11 ` Mattia Dongili
2006-04-07 6:45 ` Blaisorblade
2006-04-07 16:52 ` Mattia Dongili
2006-04-09 12:52 ` Stefano Melchior
2006-04-19 9:52 ` Blaisorblade
2006-04-19 19:07 ` Mattia Dongili
2006-04-21 18:34 ` Blaisorblade
2006-04-21 21:18 ` Blaisorblade
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200604040239.45495.blaisorblade@yahoo.it \
--to=blaisorblade@yahoo.it \
--cc=geert@linux-m68k.org \
--cc=jdike@addtoit.com \
--cc=malattia@linux.it \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.