Skip to contentSkip to conversation

ptrace probs?

DISCUSSION Frank Peters 2 participants 3 messages Sep 10, 2002 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Kernel: 2.4.18

If I ptrace-Attach to some program I cannot immediately peek values! ( I can but they are all 0) if I insert a sleep(1) after the ATTACH it works?

Can somebody explain?

Frank

#1 lore raw
Quoted 7 lines · Frank Peters

Kernel: 2.4.18

If I ptrace-Attach to some program I cannot immediately peek values! ( I can but they are all 0) if I insert a sleep(1) after the ATTACH it works?

Can somebody explain?

I don't see any problems here... can you post test code, showing exactly where something goes wrong?

Signature · 2 lines
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 2 lines · Frank Peters

Kernel: 2.4.18
maybe it's a glibc prob.

Try waitpid (PID, &status, 0) first. You can't do anything until the process stops, that's normal.

Signature · 2 lines
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer