Skip to contentSkip to conversation

Mapping a piece of one process' addrspace to another?

DISCUSSION Jesse Pollard 1 participant 1 message Mar 7, 2001

lore
Share & tools
lore
#0 lore raw

Marcelo Tosatti <[email protected]>:

Quoted 9 lines · Alexander Viro
Quoted 5 lines

You are reinventing the wheel.
man ptrace (see PTRACE_{PEEK,POKE}{TEXT,DATA} and PTRACE_{ATTACH,CONT,DETACH})

With ptrace data will be copied twice. As far as I understood, Jeremy wants to avoid that.

The the only way left would be to mmap a file. The second process could mmap the same file to put data.I believe the buffers holding the data would be shared between the two processes.

How the first process detects that I don't know (semaphore? signal?).

-------------------------------------------------------------------------
Jesse I Pollard, II
Email: [email protected]

Any opinions expressed are solely my own.