Merged trunk changes r9797:9829 into 217update branch.
--- gstreamer-0.10.10/gst/gst.c.orig 2006-10-17 10:35:19.126165000 +0800
+++ gstreamer-0.10.10/gst/gst.c 2006-10-17 10:35:29.869946000 +0800
@@ -104,6 +104,25 @@
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
+
+/*
+ * This is a nasty hack. I notice that GStreamer core dumps when this
+ * feature is enabled on Solaris. The waitpid man page says that it
+ * returns -1 on failure, but I put a "sleep (20)" when the subprocess
+ * forks and attached the debugger to it. Interestingly, the forked code
+ * seems to work fine and makes the "_exit (0)" call with the comment
+ * that _exit is being used to avoid causing the main process from
+ * crashing which is what it seems to cause on Solaris anyway. Turning
+ * off this feature causes GStreamer to not check/rebuild the registry
+ * in a separate thread which slows down the code a bit, and it fixes
+ * the crash issue. At some point, we should look into this more and
+ * fix the problem so GStreamer starts up faster. This doesn't really
+ * break anything since this performance improvement is a new feature.
+ */
+#ifdef __sun
+#undef HAVE_FORK
+#endif
+
#ifdef HAVE_FORK
#include <sys/wait.h>
#endif /* HAVE_FORK */