lkml.org 
[lkml]   [2006]   [Dec]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectFeature request: exec self for NOMMU.
    Date
    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.

    What would be really nice is if I could feed a NULL path to exec on NOMMU
    systems, and have that mean "re-exec the current executable". I can't think
    of a way to do this without kernel support. Any opinions on whether this is
    worthwhile?

    A nommu-friendly daemonize() is another use for this, by the way...

    Rob
    --
    "Perfection is reached, not when there is no longer anything to add, but
    when there is no longer anything to take away." - Antoine de Saint-Exupery
    -
    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 00:39    [W:2.119 / U:0.180 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site