aboutsummaryrefslogtreecommitdiffstats
path: root/ports/common/guts/fork.c
diff options
context:
space:
mode:
Diffstat (limited to 'ports/common/guts/fork.c')
-rw-r--r--ports/common/guts/fork.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/ports/common/guts/fork.c b/ports/common/guts/fork.c
new file mode 100644
index 0000000..76cac6f
--- /dev/null
+++ b/ports/common/guts/fork.c
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2008-2010 Wind River Systems; see
+ * guts/COPYRIGHT for information.
+ *
+ * static int
+ * wrap_fork(void) {
+ * int rc = -1;
+ */
+ 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();
+ }
+ }
+/* return rc;
+ * }
+ */