Re: 2.4 setproctitle breakage

From: Andries Brouwer (aeb@veritas.com)
Date: Wed Jun 14 2000 - 18:01:14 EST


On Wed, Jun 14, 2000 at 03:41:02AM +0400, Khimenko Victor wrote:

> NH> I posted a patch in March which changes the behaviour of
> NH> /proc/$$/cmdline to be compatable with that of 2.2 -- so an
> NH> application can use the environment space in addition to the
> NH> command line for the purpose of setproctitle.
>
> It's just plain wrong thing to do. Adding hack to make other hack
> working is bad thing(tm).

Yes.

> Basically most kernel developers do not bother it seems.
> If it's not in POSIX it does not exist - bunch of broken programs
> (rare ones - like wu-ftpd, sendmail and utils-linux :-) do not count
> unless it can crash system badly...

setproctitle is a cute hack that happened to work on BSD when sendmail
was written. The code is incorrect, just like code that assumes that
there will be an empty string at address zero, but it happens to work
on some systems. Until recently Linux was among the systems where
this incorrect code happened to work.
Since the code is incorrect, it is protected by a DO_PS_FIDDLING
define in the mount source. One of these days I should turn this define
into something figured out by configure.

setproctitle is the kind of stuff I am happy to see broken.

Andries

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jun 15 2000 - 21:00:33 EST