strace/signalfd.c
Dmitry V. Levin 9e8a84fa3d signalfd, signalfd4: mark return code with RVAL_FD flag
* signalfd.c (do_signalfd): Set RVAL_FD flag in the return code.
2015-08-03 09:14:28 +00:00

28 lines
510 B
C

#include "defs.h"
static int
do_signalfd(struct tcb *tcp, int flags_arg)
{
/* NB: kernel requires arg[2] == NSIG / 8 */
printfd(tcp, tcp->u_arg[0]);
tprints(", ");
print_sigset_addr_len(tcp, tcp->u_arg[1], tcp->u_arg[2]);
tprintf(", %lu", tcp->u_arg[2]);
if (flags_arg >= 0) {
tprints(", ");
printflags(open_mode_flags, tcp->u_arg[flags_arg], "O_???");
}
return RVAL_DECODED | RVAL_FD;
}
SYS_FUNC(signalfd)
{
return do_signalfd(tcp, -1);
}
SYS_FUNC(signalfd4)
{
return do_signalfd(tcp, 3);
}