1/* Wait for process to change state, BSD style. Linux version.
2 Copyright (C) 2020-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
18
19#include <sys/wait.h>
20#include <sys/resource.h>
21#include <sys/types.h>
22
23pid_t
24__wait3_time64 (int *stat_loc, int options, struct __rusage64 *usage)
25{
26 return __wait4_time64 (WAIT_ANY, stat_loc, options, usage);
27}
28#if __TIMESIZE != 64
29libc_hidden_def (__wait3_time64)
30
31pid_t
32__wait3 (int *stat_loc, int options, struct rusage *usage)
33{
34 struct __rusage64 usage64;
35 pid_t ret = __wait3_time64 (stat_loc, options,
36 usage != NULL ? &usage64 : NULL);
37 if (ret > 0 && usage != NULL)
38 rusage64_to_rusage (&usage64, usage);
39
40 return ret;
41}
42#endif
43
44weak_alias (__wait3, wait3)
45

source code of glibc/sysdeps/unix/sysv/linux/wait3.c