wait6.c revision 281712
1221167Sgnn/* 2221167Sgnn * Copyright (c) 2015 The FreeBSD Foundation. 3221167Sgnn * All rights reserved. 4221167Sgnn * 5221167Sgnn * Portions of this software were developed by Konstantin Belousov 6221167Sgnn * under sponsorship from the FreeBSD Foundation. 7221167Sgnn * 8221167Sgnn * Redistribution and use in source and binary forms, with or without 9221167Sgnn * modification, are permitted provided that the following conditions 10221167Sgnn * are met: 11221167Sgnn * 1. Redistributions of source code must retain the above copyright 12221167Sgnn * notice(s), this list of conditions and the following disclaimer as 13221167Sgnn * the first lines of this file unmodified other than the possible 14221167Sgnn * addition of one or more copyright notices. 15221167Sgnn * 2. Redistributions in binary form must reproduce the above copyright 16221167Sgnn * notice(s), this list of conditions and the following disclaimer in 17221167Sgnn * the documentation and/or other materials provided with the 18221167Sgnn * distribution. 19221167Sgnn * 20221167Sgnn * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY 21221167Sgnn * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22221167Sgnn * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23221167Sgnn * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE 24221167Sgnn * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25221167Sgnn * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26221167Sgnn * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 27221167Sgnn * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 28221167Sgnn * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 29221167Sgnn * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 30221167Sgnn * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31221167Sgnn */ 32221167Sgnn 33221167Sgnn#include <sys/cdefs.h> 34221167Sgnn__FBSDID("$FreeBSD: head/lib/libc/sys/wait6.c 281712 2015-04-18 21:35:41Z kib $"); 35221167Sgnn 36221167Sgnn#include <sys/types.h> 37221167Sgnn#include <sys/wait.h> 38221167Sgnn#include <signal.h> 39221167Sgnn#include "libc_private.h" 40221167Sgnn 41221167Sgnn__weak_reference(__sys_wait6, __wait6); 42221167Sgnn 43221167Sgnn#pragma weak wait6 44221167Sgnnpid_t 45221167Sgnnwait6(idtype_t idtype, id_t id, int *status, int options, struct __wrusage *ru, 46221167Sgnn siginfo_t *infop) 47221167Sgnn{ 48221167Sgnn 49221167Sgnn return (((pid_t (*)(idtype_t, id_t, int *, int, struct __wrusage *, 50221167Sgnn siginfo_t *))__libc_interposing[INTERPOS_wait6])(idtype, id, 51221167Sgnn status, options, ru, infop)); 52221167Sgnn} 53221167Sgnn