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

  1. Newsgroups: comp.unix.aix
  2. Path: sparky!uunet!newsgate.watson.ibm.com!yktnews!admin!gerth
  3. From: gerth@watson.ibm.com (John Gerth)
  4. Subject: Re: Access another process data segment(s)/address space    
  5. Sender: news@watson.ibm.com (NNTP News Poster)
  6. Message-ID: <1992Nov11.154332.129548@watson.ibm.com>
  7. Date: Wed, 11 Nov 1992 15:43:32 GMT
  8. Distribution: us
  9. Reply-To: gerth@watson.ibm.com
  10. Disclaimer: This posting represents the poster's views, not necessarily those of IBM
  11. References: <1992Nov10.090641.20896@ulrik.uio.no> <LUCIEN.92Nov10101313@fionavar.watson.ibm.com> <1992Nov11.075544.29818@ulrik.uio.no>
  12. Nntp-Posting-Host: minnie.watson.ibm.com
  13. Organization: IBM T.J. Watson Research Center
  14. Lines: 38
  15.  
  16. In article <1992Nov11.075544.29818@ulrik.uio.no>, mhe@hal.uio.no (Morten Hermanrud) writes:
  17. |> In article <LUCIEN.92Nov10101313@fionavar.watson.ibm.com>, lucien@watson.ibm.com (Lucien Van Elsen) writes:
  18. |> 
  19. |> The ptrace allows me to read/write bytes in anothes process's address
  20. |> space but it will not allow me to use the 'read' system call with
  21. |> an address in the other process's address space as an argument without
  22. |> copying the data into my own address space first. As the amount of data
  23. |> is HUGE this would be an incredibl°e wastfull operation....
  24. |> 
  25. |> What I want to do is :
  26. |> 
  27. |>      .
  28. |>      .
  29. |>      map process B's address space to my address space at addr N
  30. |>      write(fd,N,n_bytes);
  31. |>      .
  32. |>      .
  33. |>      read(fd,N,n_bytes);
  34. |>      .
  35. |>      .
  36. |> 
  37. |> such that the read/write operation goes directly into process B's 
  38. |> address space.
  39. |>  
  40. |> 
  41.  
  42. The supported (and fairly portable) methods for doing this sort of    
  43. thing revolve around that word you used 'map'.  If A and B can
  44. cooperate long enough to do shmat() or mmap(), then what you want
  45. is pretty straightforward.
  46.  
  47. However, if you really want to have shared access to B's "private segment",
  48. I don't think there's any "legal" way to do that so even though it's technically
  49. possible, you probably don't want to rely on something which can go away
  50. anytime and is undocumented.   
  51.  
  52. -- 
  53. John Gerth     gerth@watson.ibm.com        (914) 784-7639
  54.