xref: /aosp_15_r20/external/mksh/src/jehanne.c (revision 7c356e860f31eadd15fd599fcfdb9fd21f16a9d4)
1*7c356e86SAndroid Build Coastguard Worker /*-
2*7c356e86SAndroid Build Coastguard Worker  * Copyright (c) 2017
3*7c356e86SAndroid Build Coastguard Worker  *	Giacomo Tesio <[email protected]>
4*7c356e86SAndroid Build Coastguard Worker  *
5*7c356e86SAndroid Build Coastguard Worker  * Provided that these terms and disclaimer and all copyright notices
6*7c356e86SAndroid Build Coastguard Worker  * are retained or reproduced in an accompanying document, permission
7*7c356e86SAndroid Build Coastguard Worker  * is granted to deal in this work without restriction, including un-
8*7c356e86SAndroid Build Coastguard Worker  * limited rights to use, publicly perform, distribute, sell, modify,
9*7c356e86SAndroid Build Coastguard Worker  * merge, give away, or sublicence.
10*7c356e86SAndroid Build Coastguard Worker  *
11*7c356e86SAndroid Build Coastguard Worker  * This work is provided "AS IS" and WITHOUT WARRANTY of any kind, to
12*7c356e86SAndroid Build Coastguard Worker  * the utmost extent permitted by applicable law, neither express nor
13*7c356e86SAndroid Build Coastguard Worker  * implied; without malicious intent or gross negligence. In no event
14*7c356e86SAndroid Build Coastguard Worker  * may a licensor, author or contributor be held liable for indirect,
15*7c356e86SAndroid Build Coastguard Worker  * direct, other damage, loss, or other issues arising in any way out
16*7c356e86SAndroid Build Coastguard Worker  * of dealing in the work, even if advised of the possibility of such
17*7c356e86SAndroid Build Coastguard Worker  * damage or existence of a defect, except proven that it results out
18*7c356e86SAndroid Build Coastguard Worker  * of said person's immediate fault when using the work as intended.
19*7c356e86SAndroid Build Coastguard Worker  *-
20*7c356e86SAndroid Build Coastguard Worker  * Initialisation code for the Jehanne operating system (a Plan 9 de-
21*7c356e86SAndroid Build Coastguard Worker  * rivative, using GCC)
22*7c356e86SAndroid Build Coastguard Worker  */
23*7c356e86SAndroid Build Coastguard Worker 
24*7c356e86SAndroid Build Coastguard Worker static const char __rcsid[] __attribute__((__used__)) =
25*7c356e86SAndroid Build Coastguard Worker     "$MirOS: src/bin/mksh/jehanne.c,v 1.1 2017/12/22 16:30:00 tg Exp $";
26*7c356e86SAndroid Build Coastguard Worker 
27*7c356e86SAndroid Build Coastguard Worker #include <u.h>
28*7c356e86SAndroid Build Coastguard Worker #include <lib9.h>
29*7c356e86SAndroid Build Coastguard Worker #include <posix.h>
30*7c356e86SAndroid Build Coastguard Worker 
31*7c356e86SAndroid Build Coastguard Worker void
__application_newlib_init(int argc,char * argv[])32*7c356e86SAndroid Build Coastguard Worker __application_newlib_init(int argc, char *argv[])
33*7c356e86SAndroid Build Coastguard Worker {
34*7c356e86SAndroid Build Coastguard Worker 	rfork(RFFDG | RFREND | RFNOTEG);
35*7c356e86SAndroid Build Coastguard Worker 	libposix_emulate_SIGCHLD();
36*7c356e86SAndroid Build Coastguard Worker }
37