I used prctl from time to time to change a child's name, but I didn't think of using argv directly, to pass more information. In fact I discovered it was possible, when I asked this very question. Thank you all for all the really interesting information.
2016-02-02 0:14 GMT+01:00 Mike Frysinger <vap...@gentoo.org>: > On 02 Feb 2016 00:09, Didier Kryn wrote: >> Le 01/02/2016 23:34, Mike Frysinger a écrit : >> > On 01 Feb 2016 22:33, Didier Kryn wrote: >> >> Le 01/02/2016 18:10, Mike Frysinger a écrit : >> >>> it makes a lot of sense when you fork children that have specific >> >>> purposes. >> >>> rather than just seeing the program's name 4 times, it's more helpful for >> >>> them to be broken up. >> >> prctl() can be used for that, with the operation code PR_SET_NAME. >> >> It does not change the command line. >> > right, but that has its own limitations: >> > - it's new to linux-2.6.9 >> > - can only set the name >> > - is limited to 16 bytes >> > - can't change command line args >> > >> > so we're still stuck with this behavior of modifying the argv mem directly >> > :( >> >> IIUC your argument was there's a need to give sensible names to >> children. prctl() allows this *without* resorting to modifying the >> command line args. I don't find 16 chars (in reality 15) is short for >> the purpose. > > if you look at the examples i already posted, 16 is too small for every > one there. when i've munged the `ps` listing in the past, i've also > easily run past 16 bytes. your cases might be short, but that doesn't > mean every scenario is that way. > -mike > > _______________________________________________ > busybox mailing list > busybox@busybox.net > http://lists.busybox.net/mailman/listinfo/busybox _______________________________________________ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox