home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.aix
- Path: sparky!uunet!ddssuprs!fred
- From: fred@dickens.com (Fred R Stearns)
- Subject: Re: Access another process data segment(s)/address space
- Message-ID: <1992Nov11.121557.23237@dickens.com>
- Date: Wed, 11 Nov 1992 12:15:57 GMT
- References: <1992Nov10.090641.20896@ulrik.uio.no> <LUCIEN.92Nov10101313@fionavar.watson.ibm.com> <1992Nov11.075544.29818@ulrik.uio.no>
- Organization: Dickens Data Systems, Inc.
- Lines: 45
-
- 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:
- >|> mhe@hal.uio.no (Morten Hermanrud) writes:
- >|>
- >|> >Is there any way process A can 'attach' process B's address space ?
- >|>
- >|> The ptrace() syscall is what you're looking for; you can attach a process
- >|> and then read/write to it's address space. Info gives more complete
- >|> information on how to use it.
- >|>
- >|> -Lucien
- >|>
- >|> --
- >|> -----------------------------------------------------------------------
- >|> Lucien Van Elsen IBM Research
- >|> lucien@watson.ibm.com Project Agora
- >
- >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.
- >
- >
-
- What about attaching a shared memory segment in both of the
- processes?
- --
- Fred R. Stearns -- fred@dickens.com
- Everything's a kludge!
-