[PATCH] init: allow to preserve init's command-line

Nicolas CARRIER carrier.nicolas0 at gmail.com
Mon Feb 1 17:00:57 UTC 2016


When launched as PID 1 and after parsing it's arguments, init wipes all
all of them except argv[0] and rewrites argv[0] to contain only "init",
so that it's command-line appears solely as "init" in tools such as ps.

This patch adds the FEATURE_PRESERVE_CMDLINE which, if set to Y, will make
init preserve all it's arguments including argv[0], be they parsed or
ignored.
The original command-line used to launch init can then be retrieved in
/proc/1/cmdline on Linux, for example.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20160201/80eaf47f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-init-allow-to-preserve-init-s-command-line.patch
Type: text/x-patch
Size: 2367 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20160201/80eaf47f/attachment.bin>


More information about the busybox mailing list