home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / hp / 12694 < prev    next >
Encoding:
Text File  |  1992-11-09  |  1.8 KB  |  35 lines

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