summaryrefslogtreecommitdiff
path: root/src/pidfd_open.c
blob: 166566fd100f9b80eee59cacbab17d7ed08ab14e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
 * Copyright (c) 2019 Dmitry V. Levin <ldv@strace.io>
 * Copyright (c) 2019-2021 The strace developers.
 * All rights reserved.
 *
 * SPDX-License-Identifier: LGPL-2.1-or-later
 */

#include "defs.h"
#include "kernel_fcntl.h"
#include "xlat/pidfd_open_flags.h"

SYS_FUNC(pidfd_open)
{
	/* pid_t pid */
	printpid(tcp, tcp->u_arg[0], PT_TGID);
	tprint_arg_next();

	/* unsigned int flags */
	printflags(pidfd_open_flags, tcp->u_arg[1], "PIDFD_???");

	return RVAL_DECODED | RVAL_FD;
}