aboutsummaryrefslogtreecommitdiffstats
path: root/guts/fork.c
blob: b7fd23997cb40894e36322a490f8d9947651da73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* 
 * Copyright (c) 2008-2010 Wind River Systems; see
 * guts/COPYRIGHT for information.
 *
 * static int
 * wrap_fork(void) {
 *	int rc = -1;
 */
	if (real_fork) {
		rc = real_fork();
		/* special case: we may want to enable or disable
		 * pseudo in the child process
		 */
		if (rc == 0) {
			if (!pseudo_get_value("PSEUDO_RELOADED")) {
                		pseudo_setupenv();
				pseudo_reinit_libpseudo();
 			} else {
				pseudo_setupenv();
				pseudo_dropenv();
			}
		}
	} else {
		/* rc was initialized to the "failure" value */
		pseudo_enosys("fork");
	}
/*	return rc;
 * }
 */