setproctitle()
Dmitry V. Levin
ldv@altlinux.org
Wed Sep 30 22:58:00 GMT 2009
On Wed, Sep 30, 2009 at 04:55:31PM -0400, Timo Sirainen wrote:
> BSDs have:
>
> void setproctitle(const char *fmt, ...);
>
> to change the process title (in ps output). Could this also be added to
> glibc? Or would it be better done by adding a new syscall to Linux
> kernel?
>
> (I know there's a way to already mess around with argv and environ to
> implement it, but it seems pretty dangerous so I haven't dared to use it
> on my actual programs.)
The method you call pretty dangerous is used here and there for a long
time already. I even wrote a library about 5 years ago that implements
setproctitle() for GNU/Linux, see
http://git.altlinux.org/people/ldv/packages/?p=setproctitle.git
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20090930/b9c8b950/attachment.sig>
More information about the Libc-alpha
mailing list