Hello,
One of my applications leaked a file descriptor due to some unbalanced
socketpair(2) / close(2) calls. I intended to use the dtrace syscall
provider to print file descriptor numbers and invocations of those two
syscalls. This happens on macOS 10.12.
However I have problems to print the sockets allocated by socketpair(2).
The following (and many variations) does not work as expected:
syscall::socketpair:entry
/pid == $target/
{
ps1 = arg3;
}
syscall::socketpair:return
/pid == $target/
{
s1 = *(int*)copyin(ps1, 4);
printf("%i", s1);
}
Could someone please explain how to properly dump the allocated sockets?
Thanks,
Gregor
-------------------------------------------
dtrace-discuss
Archives: https://www.listbox.com/member/archive/184261/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184261/25769126-e243886f
Modify Your Subscription:
https://www.listbox.com/member/?member_id=25769126&id_secret=25769126-8d47a7b2
Powered by Listbox: http://www.listbox.com