aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.txt4
-rw-r--r--guts/clone.c27
-rw-r--r--pseudo_wrappers.c58
-rw-r--r--templates/wrapfuncs.h3
-rw-r--r--templates/wrapper_table5
5 files changed, 4 insertions, 93 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt
index fc3aa5b..670072c 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,4 +1,8 @@
2011-02-18:
+ * (seebs) disable clone for WRLINUX_NOCLONE branch because it
+ breaks on RHEL4, but we don't want to move to the ports model yet.
+
+2011-02-18:
* (seebs) fix uninitialized variable
2011-02-10:
diff --git a/guts/clone.c b/guts/clone.c
deleted file mode 100644
index b3400c7..0000000
--- a/guts/clone.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * 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, pid, tls, ctid);
-/* ...
- * return rc;
- * }
- */
diff --git a/pseudo_wrappers.c b/pseudo_wrappers.c
index 470206a..a32aa0d 100644
--- a/pseudo_wrappers.c
+++ b/pseudo_wrappers.c
@@ -523,64 +523,6 @@ vfork(void) {
return fork();
}
-int
-clone(int (*fn)(void *), void *child_stack, int flags, void *arg, ...) {
- sigset_t saved;
- va_list ap;
- pid_t *pid;
- struct user_desc *tls;
- pid_t *ctid;
-
- int rc = -1;
-
- if (!pseudo_check_wrappers() || !real_clone) {
- /* rc was initialized to the "failure" value */
- pseudo_enosys("clone");
- return rc;
- }
-
- va_start(ap, arg);
- pid = va_arg(ap, pid_t *);
- tls = va_arg(ap, struct user_desc *);
- ctid = va_arg(ap, pid_t *);
- va_end(ap);
-
- pseudo_debug(4, "called: clone\n");
- pseudo_sigblock(&saved);
- if (pseudo_getlock()) {
- errno = EBUSY;
- sigprocmask(SIG_SETMASK, &saved, NULL);
- return -1;
- }
-
- int save_errno;
- int save_disabled = pseudo_disabled;
- /* 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!
- */
-
-#include "guts/clone.c"
-
- if (save_disabled != pseudo_disabled) {
- if (pseudo_disabled) {
- pseudo_disabled = 0;
- pseudo_magic();
- } else {
- pseudo_disabled = 1;
- pseudo_antimagic();
- }
- }
-
- save_errno = errno;
- pseudo_droplock();
- sigprocmask(SIG_SETMASK, &saved, NULL);
- pseudo_debug(4, "completed: clone\n");
- errno = save_errno;
- return rc;
-}
-
#if 0
static int (*real_execlp)(const char *file, const char *arg, ...) = NULL;
static int (*real_execl)(const char *file, const char *arg, ...) = NULL;
diff --git a/templates/wrapfuncs.h b/templates/wrapfuncs.h
index 403d261..7ec7637 100644
--- a/templates/wrapfuncs.h
+++ b/templates/wrapfuncs.h
@@ -14,9 +14,6 @@ static ${type} (*real_${name})(${decl_args});
/* int fork(void) */
static int wrap_fork(void);
static int (*real_fork)(void);
-/* int clone(int (*fn)(void *), void *child_stack, int flags, void *arg, ...) */
-static int wrap_clone(int (*fn)(void *), void *child_stack, int flags, void *arg, ...);
-static int (*real_clone)(int (*fn)(void *), void *child_stack, int flags, void *arg, ...);
/* int execv(const char *file, char *const *argv) */
static int wrap_execv(const char *file, char *const *argv);
static int (*real_execv)(const char *file, char *const *argv);
diff --git a/templates/wrapper_table b/templates/wrapper_table
index dd9c249..42ee159 100644
--- a/templates/wrapper_table
+++ b/templates/wrapper_table
@@ -22,11 +22,6 @@ static struct {
(int (**)(void)) &real_fork,
(int (*)(void)) wrap_fork
},
- { /* int clone(int (*fn)(void *), void *, int, void, ...); */
- "clone",
- (int (**)(void)) &real_clone,
- (int (*)(void)) wrap_clone
- },
{ /* int execv(const char *file, char *const *argv); */
"execv",
(int (**)(void)) &real_execv,