|
From: Josef W. <Jos...@gm...> - 2006-09-20 23:15:25
|
Followup:
The following does _not_ work to catch the child after fork:
void CLG_(post_syscall)(ThreadId tid, UInt syscallno, SysRes res)
{
/* if we are in the child after a fork, zero costs */
if ((syscallno == __NR_fork) &&
(res.isError == False) &&
(res.val == 0)) {
if (VG_(clo_verbosity > 1)) {
VG_(message)(Vg_UserMsg,
"Zeroing costs in child after fork.");
}
CLG_(zero_all_cost)(False);
}
}
I can see with --trace-syscalls=yes that a glibc fork()
actually is doing a clone here on Suse 10.1 :-(
Josef
|