diff options
Diffstat (limited to 'ports/linux/oldclone/guts/clone.c')
-rw-r--r-- | ports/linux/oldclone/guts/clone.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ports/linux/oldclone/guts/clone.c b/ports/linux/oldclone/guts/clone.c new file mode 100644 index 0000000..58ff4ad --- /dev/null +++ b/ports/linux/oldclone/guts/clone.c @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2008-2010 Wind River Systems; see + * guts/COPYRIGHT for information. + * + * static int + * clone(...) { + * .... + */ + /* because clone() doesn't actually continue in this function, we + * can't check the return and fix up environment variables in the + * child. Instead, we have to temporarily do any fixup, then possibly + * undo it later. UGH! + */ + pseudo_debug(1, "client resetting for clone(2) call\n"); + if (!pseudo_get_value("PSEUDO_RELOADED")) { + pseudo_setupenv(); + pseudo_reinit_libpseudo(); + } else { + pseudo_setupenv(); + pseudo_dropenv(); + } + /* call the real syscall */ + rc = (*real_clone)(fn, child_stack, flags, arg); +/* ... + * return rc; + * } + */ |