home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / aix / 11478 < prev    next >
Encoding:
Text File  |  1992-11-11  |  1.9 KB  |  56 lines

  1. Newsgroups: comp.unix.aix
  2. Path: sparky!uunet!ddssuprs!fred
  3. From: fred@dickens.com (Fred R Stearns)
  4. Subject: Re: Access another process data segment(s)/address space    
  5. Message-ID: <1992Nov11.121557.23237@dickens.com>
  6. Date: Wed, 11 Nov 1992 12:15:57 GMT
  7. References: <1992Nov10.090641.20896@ulrik.uio.no> <LUCIEN.92Nov10101313@fionavar.watson.ibm.com> <1992Nov11.075544.29818@ulrik.uio.no>
  8. Organization: Dickens Data Systems, Inc.
  9. Lines: 45
  10.  
  11. In article <1992Nov11.075544.29818@ulrik.uio.no> mhe@hal.uio.no (Morten Hermanrud) writes:
  12. >In article <LUCIEN.92Nov10101313@fionavar.watson.ibm.com>, lucien@watson.ibm.com (Lucien Van Elsen) writes:
  13. >|> mhe@hal.uio.no (Morten Hermanrud) writes:
  14. >|> 
  15. >|> >Is there any way process A can 'attach' process B's address space ?
  16. >|> 
  17. >|> The ptrace() syscall is what you're looking for; you can attach a process
  18. >|> and then read/write to it's address space.  Info gives more complete
  19. >|> information on how to use it.
  20. >|> 
  21. >|>     -Lucien
  22. >|> 
  23. >|> --
  24. >|> -----------------------------------------------------------------------
  25. >|> Lucien Van Elsen                                          IBM  Research
  26. >|> lucien@watson.ibm.com                                     Project Agora
  27. >
  28. >The ptrace allows me to read/write bytes in anothes process's address
  29. >space but it will not allow me to use the 'read' system call with
  30. >an address in the other process's address space as an argument without
  31. >copying the data into my own address space first. As the amount of data
  32. >is HUGE this would be an incredibl°e wastfull operation....
  33. >
  34. >What I want to do is :
  35. >
  36. >     .
  37. >     .
  38. >     map process B's address space to my address space at addr N
  39. >     write(fd,N,n_bytes);
  40. >     .
  41. >     .
  42. >     read(fd,N,n_bytes);
  43. >     .
  44. >     .
  45. >
  46. >such that the read/write operation goes directly into process B's 
  47. >address space.
  48. >
  49.  
  50. What about attaching a shared memory segment in both of the
  51. processes?
  52. -- 
  53. Fred R. Stearns -- fred@dickens.com
  54. Everything's a kludge!
  55.