lkml.org 
[lkml]   [1998]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: linux-kernel-digest V1 #2839
pavel@inet.cz wrote:


> From: <peeter_joot@VNET.IBM.COM> (peeter joot)
> Date: Sat, 14 Nov 1998 12:55:32 -0500 (EST)
>
> Hi,
>
> > Attached below is a patch that allows /proc/<pid>/cmdline to be writable.
> > Some other operating systems have mechanisms that allow you to change the
> > name that shows up when you do a ps (AIX -- write into argv[0], HP -- via
> > pstat()). I didn't think that it would be too hard to allow the
> > same thing on linux via /proc/, and gave it a try.
>
> it is already possible (see sendmail's function setproctitle in src/conf.c):
>
> 277 ? S 0:00 sendmail: accepting connections on port 25

The sendmail solution (kludge? at least on Linux :) requires write access to /dev/kmem which only
root can do. It would be a lot cleaner if you could indeed modify the cmdline via the /proc
filesystem. I really like the idea, especially when programming with threads; ps should be more
useful if you could easily "rename" threads without root privileges. It sure beats seeing 20 ps
entries with the original command line..

> - --
> Pavel Janík ml.
> Pavel.Janik@inet.cz

Andy

--
Andy Lo A Foe, arloafoe@cs.vu.nl | Linux v2.1.128 | PII 266
http://www.cs.vu.nl/~arloafoe | GSM: 0622-440695 | Bebox 133
http://orbital.xs4all.nl/andy | ICQ: 7472949 | IRCNet: Adnans




-
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/

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:0.052 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site