home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.aix
- Path: sparky!uunet!newsgate.watson.ibm.com!yktnews!admin!gerth
- From: gerth@watson.ibm.com (John Gerth)
- Subject: Re: Access another process data segment(s)/address space
- Sender: news@watson.ibm.com (NNTP News Poster)
- Message-ID: <1992Nov11.154332.129548@watson.ibm.com>
- Date: Wed, 11 Nov 1992 15:43:32 GMT
- Distribution: us
- Reply-To: gerth@watson.ibm.com
- Disclaimer: This posting represents the poster's views, not necessarily those of IBM
- References: <1992Nov10.090641.20896@ulrik.uio.no> <LUCIEN.92Nov10101313@fionavar.watson.ibm.com> <1992Nov11.075544.29818@ulrik.uio.no>
- Nntp-Posting-Host: minnie.watson.ibm.com
- Organization: IBM T.J. Watson Research Center
- Lines: 38
-
- In article <1992Nov11.075544.29818@ulrik.uio.no>, mhe@hal.uio.no (Morten Hermanrud) writes:
- |> In article <LUCIEN.92Nov10101313@fionavar.watson.ibm.com>, lucien@watson.ibm.com (Lucien Van Elsen) writes:
- |>
- |> The ptrace allows me to read/write bytes in anothes process's address
- |> space but it will not allow me to use the 'read' system call with
- |> an address in the other process's address space as an argument without
- |> copying the data into my own address space first. As the amount of data
- |> is HUGE this would be an incredibl°e wastfull operation....
- |>
- |> What I want to do is :
- |>
- |> .
- |> .
- |> map process B's address space to my address space at addr N
- |> write(fd,N,n_bytes);
- |> .
- |> .
- |> read(fd,N,n_bytes);
- |> .
- |> .
- |>
- |> such that the read/write operation goes directly into process B's
- |> address space.
- |>
- |>
-
- The supported (and fairly portable) methods for doing this sort of
- thing revolve around that word you used 'map'. If A and B can
- cooperate long enough to do shmat() or mmap(), then what you want
- is pretty straightforward.
-
- However, if you really want to have shared access to B's "private segment",
- I don't think there's any "legal" way to do that so even though it's technically
- possible, you probably don't want to rely on something which can go away
- anytime and is undocumented.
-
- --
- John Gerth gerth@watson.ibm.com (914) 784-7639
-