System calls that return file descriptors
Dmitry V. Levin
ldv at altlinux.org
Fri May 23 02:49:24 UTC 2014
On Thu, May 22, 2014 at 08:45:44PM +0530, Zubin Mithra wrote:
> I've restructured it a bit more, added in dup* calls, please see commit at
>  and sample output at .
>  https://gist.github.com/eQu1NoX/ccd6e2f9d45e2e0e82f9
> > There is a receive call, that allows to forward open file descriptors
> > between
> > processes. I do not known, if you call those received fds "socket fds",
> > since
> > they could be any (unresolvable) fd -- unless you poke into /proc for more
> > information.
> Could you please give more information on which syscall you are referring
> to? I couldn't find a syscall that matched your description.
recvmsg and recvmmsg, decoded using printcmsghdr (see SCM_RIGHTS).
I suppose it should just use printfd.
These syscalls don't return file descriptors, they may receive them from
the kernel in a way more similar to pipe/pipe2/socketpair rather than
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 181 bytes
Desc: not available
More information about the Strace-devel