From: Denis Vlasenko <vda.linux@googlemail.com>
To: Rob Landley <rob@landley.net>
Cc: ray-gmail@madrabbit.org, linux-kernel@vger.kernel.org,
"David McCullough" <david_mccullough@au.securecomputing.com>
Subject: Re: Feature request: exec self for NOMMU.
Date: Thu, 28 Dec 2006 03:48:16 +0100 [thread overview]
Message-ID: <200612280348.16670.vda.linux@googlemail.com> (raw)
In-Reply-To: <200612271603.39454.rob@landley.net>
On Wednesday 27 December 2006 22:03, Rob Landley wrote:
> On Wednesday 27 December 2006 1:35 pm, Denis Vlasenko wrote:
> > This solves chroot problem. How to find path-to-yourself reliably
> > (for one, without using /proc/self/exe) is not obvious to me.
>
> Been there, done that. Both my toybox and Firmware Linux projects do this.
> In FWL it's line 115 of this file:
> http://landley.net/hg/firmware?f=937346748ff4;file=sources/toys/gcc-uClibc.c
>
> It's essentially the logic of the command line "which" utility applied to
> argv[0]. If argv[0] has a relative or absolute path, then it's vs cwd (this
> has to happen when you first run the program, before you cd). If argv[0] has
> no path then look at $PATH.
Yes Rob, I know it can be done like this. But we don't want this.
In the tar example, we want :
'Run my own binary again, with parameters: "zcat" "a.tar.gz",
even if there is no [/usr][/local]/bin/zcat -> busybox link anywhere'
We do not want to _search for_ zcat. We want to reexec our own binary.
--
vda
next prev parent reply other threads:[~2006-12-28 2:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-26 23:23 Feature request: exec self for NOMMU Rob Landley
2006-12-26 23:55 ` David Lang
2006-12-27 0:39 ` Rob Landley
2006-12-27 4:24 ` Denis Vlasenko
2006-12-27 5:44 ` Rob Landley
2006-12-27 5:13 ` Ray Lee
2006-12-27 5:51 ` Rob Landley
2006-12-27 6:08 ` Vadim Lobanov
2006-12-27 8:29 ` Rob Landley
2006-12-27 18:49 ` Ray Lee
2006-12-27 21:13 ` Rob Landley
2006-12-27 18:35 ` Denis Vlasenko
2006-12-27 21:03 ` Rob Landley
2006-12-28 2:48 ` Denis Vlasenko [this message]
2006-12-28 5:32 ` Rob Landley
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=200612280348.16670.vda.linux@googlemail.com \
--to=vda.linux@googlemail.com \
--cc=david_mccullough@au.securecomputing.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ray-gmail@madrabbit.org \
--cc=rob@landley.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.