7275N/ARemove SIGCHLD signal handler.
7275N/ADNS processes are already reaped in libpurple. Sound processes are
7275N/Areaped after 15 seconds. Other processes are sent through GLib and
7275N/Areaped by it. Anyway, this means we can stop preventing GStreamer
7275N/Afrom forking, and maybe fix a D-Bus bug, or something.
7275N/A(This patch is also included with the Debian version of pidgin.)
7275N/A-#if defined(USE_GSTREAMER) && !defined(GST_CAN_DISABLE_FORKING)
7275N/A static int signal_sockets[2];
7275N/A-static void sighandler(int sig);
7275N/A- * This child process reaping stuff is currently only used for processes that
7275N/A- * were forked to play sounds. It's not needed for forked DNS child, which
7275N/A- * have their own waitpid() call. It might be wise to move this code into
7275N/A- pid = waitpid(-1, &status, WNOHANG);
7275N/A- } while (pid != 0 && pid != (pid_t)-1);
7275N/A- if ((pid == (pid_t) - 1) && (errno != ECHILD)) {
7275N/A- snprintf(errmsg, sizeof(errmsg), "Warning: waitpid() returned %d", pid);
7275N/A static void sighandler(int sig)
7275N/A-#if defined(USE_GSTREAMER) && !defined(GST_CAN_DISABLE_FORKING)
7275N/A-/* By default, gstreamer forks when you initialize it, and waitpids for the
7275N/A- * child. But if libpurple reaps the child rather than leaving it to
7275N/A- * gstreamer, gstreamer's initialization fails. So, we wait a second before
7275N/A- * reaping child processes, to give gst a chance to reap it if it wants to.
7275N/A- * This is not needed in later gstreamers, which let us disable the forking.
7275N/A- * And, it breaks the world on some Real Unices.
7275N/A- /* Restore signal catching */
7275N/A- signal(SIGCHLD, sighandler);
7275N/A- /* Restore signal catching */
7275N/A- signal(SIGCHLD, sighandler);
7275N/A- purple_debug_warning("sighandler", "Caught signal %d\n", sig);
7275N/A+ purple_debug_warning("sighandler", "Caught signal %d\n", sig);
7275N/A purple_debug_info("sound", "Initializing sound output drivers.\n");
7275N/A-#ifdef GST_CAN_DISABLE_FORKING
7275N/A- gst_registry_fork_set_enabled (FALSE);
7275N/A if ((gst_init_failed = !gst_init_check(NULL, NULL, &error))) {
7275N/A purple_notify_error(NULL, _("GStreamer Failure"),
7275N/A _("GStreamer failed to initialize."),