/proc/<pid>/cmdline and udhcpcd

Matt Whitlock busybox at mattwhitlock.name
Wed Mar 26 12:22:39 UTC 2014


On Wednesday, 26 March 2014, at 1:19 pm, Cristian Ionescu-Idbohrn wrote:
> But really, this is not an `init' question, as I see it.  It's about
> keeping the original/unmodified program arguments in
> /proc/<pid>/cmdline.
> 
> I know of no other program doing such sort of thing, although I think
> I understand the reason behind this particular way of handling the
> '-x' option argument in udhcpc.

Tons of programs modify their argv arrays. Anything that uses strtok to split arguments at delimiters will do it. One should never assume that /proc/<pid>/cmdline will contain the command line as it was originally used to execute the process.


More information about the busybox mailing list