lkml.org 
[lkml]   [2006]   [Dec]   [27]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateTue, 26 Dec 2006 21:13:39 -0800
From"Ray Lee" <>
SubjectRe: Feature request: exec self for NOMMU.
On 12/26/06, Rob Landley <rob@landley.net> wrote:
> I'm trying to make some nommu-friendly busybox-like tools, which means using
> vfork() instead of fork().  This means that after I fork I have to exec in
> the child to unblock the parent, and if I want to exec my current executable
> I have to find out where it lives so I can feed the path to exec().  This is
> nontrivial.
>
> Worse, it's not always possible.  If chroot() has happened since the program
> started, there may not _be_ a path to my current executable available from
> this process's current or root directories.

How about openning an fd to yourself at the beginning of execution, then calling
fexecve later?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-12-27 05:17    [W:11.864 / U:0.010 seconds]
©2003-2008 Jasper Spaans