On Thu, Jun 5, 2014 at 12:24 PM, Lennart Poettering <mzxre...@0pointer.de> wrote: > On Thu, 05.06.14 20:01, Luis R. Rodriguez (mcg...@suse.com) wrote: > >> > Hmm? You should "exec" the real daemon binary at the end, not just fork >> > it off. That wait the shell script process is replaced by the daemon >> > binary, which is what you want. >> >> I tried both just running it and also running exec foo; both presented >> the same issue given that shell exec does not really execve. > > Hmmm? You shell's "exec" command doesn't actually execve()? What are you > using? This doesn't sound very accurate...
$ strace -e execve /bin/sh -c 'exec /bin/echo test' execve("/bin/sh", ["/bin/sh", "-c", "exec /bin/echo test"], [/* 54 vars */]) = 0 execve("/bin/echo", ["/bin/echo", "test"], [/* 54 vars */]) = 0 test +++ exited with 0 +++ I get similar results on Ubuntu using dash. --Andy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/