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

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