1 /*-
2 * Copyright (c) 2008
3 * Thorsten Glaser <tg@mirbsd.org>
4 *
5 * Provided that these terms and disclaimer and all copyright notices
6 * are retained or reproduced in an accompanying document, permission
7 * is granted to deal in this work without restriction, including un-
8 * limited rights to use, publicly perform, distribute, sell, modify,
9 * merge, give away, or sublicence.
10 *
11 * This work is provided "AS IS" and WITHOUT WARRANTY of any kind, to
12 * the utmost extent permitted by applicable law, neither express nor
13 * implied; without malicious intent or gross negligence. In no event
14 * may a licensor, author or contributor be held liable for indirect,
15 * direct, other damage, loss, or other issues arising in any way out
16 * of dealing in the work, even if advised of the possibility of such
17 * damage or existence of a defect, except proven that it results out
18 * of said person's immediate fault when using the work as intended.
19 */
20
21 #include <sys/cdefs.h>
22
23 __RCSID("$MirOS: src/lib/libc/sys/exect_r.c,v 1.1 2008/12/27 21:17:55 tg Exp $");
24
25 extern void arc4random_atexit(void);
26 extern int _thread_sys_exect__(const char *path, char *const argv[],
27 char *const envp[]);
28 int _thread_sys_exect(const char *path, char *const argv[],
29 char *const envp[]);
30
31 int
_thread_sys_exect(const char * path,char * const argv[],char * const envp[])32 _thread_sys_exect(const char *path, char *const argv[], char *const envp[])
33 {
34 arc4random_atexit();
35 return (_thread_sys_exect__(path, argv, envp));
36 }
37
38 __weak_alias(exect, _thread_sys_exect);
39