home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.hp
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!hobbes.physics.uiowa.edu!news.uiowa.edu!icaen!dsiebert
- From: dsiebert@icaen.uiowa.edu (Doug Siebert)
- Subject: Writing to argv[] for display in 'ps'
- Message-ID: <1992Nov9.101145.10528@icaen.uiowa.edu>
- Sender: usenet@icaen.uiowa.edu (UseNet News daemon)
- Organization: ISCA
- Date: Mon, 9 Nov 1992 10:11:45 GMT
- Lines: 24
-
- How can I write to the argv[] strings in a program so that the altered strings
- show up in 'ps'? I know this is possible to do, if you telnet to an HP-UX
- machine (or at least my 750 running 8.07) and hook up to an internal service
- of /etc/inetd, it does this. (Do 'telnet localhost sink', and then do a ps -ef
- in another shell for an example)
-
- Since I know it can be done, the only question is how to do it. Writing
- directly to the strings, changing the pointers in the argv[] array to point
- elsewhere, and changing the value of argv itself do not work, either before or
- after a fork.
-
- I assume there must be some call I am unaware of, or is undocumented, to do
- this, and it may require root privileges. This isn't a problem, I just would
- really like to know how to do it. If someone out there knows how this is done,
- or has access to the HP-UX source of /etc/inetd, I would be very grateful if
- if they could pass along to me the information on how this is done. Thanks!
-
- --
- /-----------------------------------------------------------------------------\
- | Doug Siebert | "I don't have to take this abuse |
- | Internet: dsiebert@isca.uiowa.edu | from you - I've got hundreds of |
- | NeXTMail: dsiebert@chop.isca.uiowa.edu | people waiting in line to abuse |
- | ICBM: 41d 39m 55s N, 91d 30m 43s W | me!" Bill Murray, Ghostbusters |
- \-----------------------------------------------------------------------------/
-