Plugins showing their names in process list?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/13/05, Chris Warren <dvb@xxxxxxxxxx> wrote:
> > -----Original Message-----
> > From: vdr-bounces@xxxxxxxxxxx
> > [mailto:vdr-bounces@xxxxxxxxxxx] On Behalf Of Klaus Schmidinger
> >
> > [snip]
> >
> > Well, each thread can be given a "description", so if
> > somebody finds a way to make the 'ps' list show a given
> > string for a particular thread, it should be possible to show
> > something more informative here.
> >
> Yeah, it would be nice - but the linux kernel is missing support for
> setproctitle(), and the only user-space implementations I can find use the
> incredibly hacky method of overwriting the characters in the argv[] array.
> 
> An example implementation:
> http://cvs.linux-ha.org/viewcvs/viewcvs.cgi/linux-ha/heartbeat/setproctitle.
> c?rev=1.10.2.1&content-type=text/vnd.viewcvs-markup.
> 
> Chris

This seems to be the way to do it.
See [1] and [2].

There are other tools that uses this method e.g. readproctitle in Dan
Bernstein's deamontools e.g. [3]

Bye
Ulrich

[1] http://lkml.org/lkml/2004/8/18/34
[2] http://lkml.org/lkml/2004/8/20/208
[3] http://web.mit.edu/afs/sipb/service/qmail/src/admin/daemontools-0.76/compile/readproctitle.c


[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux