In init/main.c the kernel always sets argv[0] = "init" when calling the
init process.
The file being executed as init is commonly /sbin/init, but could be
anything, as set from init= boot paramater.
Always setting argv[0] = "init" is inconsistent with standard behaviour
of setting it to the filename that was run.
This current behaviour is inconvenient for busybox (www.busybox.net) as
it uses argv[0] to determine functionality.
The attached patch against 2.4.20 sets argv[0] to the filename being run
as the init process, it results in marginally smaller binary (12 bytes).
Is there a reason why argv[0] should always be set to "init" ?
Glenn
This archive was generated by hypermail 2b29 : Thu May 15 2003 - 22:00:26 EST