busybox nommu (fork -> vfork)

Shaun Jackman sjackman at gmail.com
Mon Jun 26 23:26:49 UTC 2006


I certainly don't recommend this patch for general application, but I
have been using it on my nommu system as big-hammer approach to
resolving unresolved symbols to fork. The most significant downside is
that you entirely lose the functionality of atexit.

Cheers,
Shaun

--- include/platform.h	f4b3516782c476b6f87126455c0eba23a7b08939
+++ include/platform.h	57714974a26806c2e03a3be7333b9a3fb69e3382
@@ -227,4 +227,18 @@
  #endif
  #endif

+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+ATTRIBUTE_NORETURN
+static inline void bb_exit(int status)
+{
+	fflush(NULL);
+	_exit(status);
+}
+
+#define exit(status) bb_exit(status)
+#define fork() vfork()
+
  #endif	/* platform.h	*/



More information about the busybox mailing list