From 6eee943b36eae5fe28f98ad8e32683785171e3d1 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 30 Jan 2009 14:18:13 +0000 Subject: [PATCH] Remove checking for and mentions of fork where possible. We no longer use fork() directly, instead using glib's spawn functionality, so don't check for it, and don't use it in the documentation notes. --- configure.ac | 4 ---- gst/gstregistry.c | 30 ++++++++++-------------------- 2 files changed, 10 insertions(+), 24 deletions(-) diff --git a/configure.ac b/configure.ac index 2ec82c8..072b332 100644 --- a/configure.ac +++ b/configure.ac @@ -203,7 +203,6 @@ case $host_os in ;; darwin*) AC_DEFINE_UNQUOTED(GST_EXTRA_MODULE_SUFFIX, [".dylib"], [Extra platform specific plugin suffix]) - AC_DEFINE_UNQUOTED(GST_HAVE_UNSAFE_FORK, 1, [Defined when registry scanning through fork is unsafe]) AC_DEFINE_UNQUOTED(HAVE_OSX, 1, [Defined if compiling for OSX]) ;; cygwin*) @@ -381,9 +380,6 @@ dnl *** checks for library functions *** AC_CHECK_FUNCS([sigaction]) -dnl we use fork in the registry code -AC_CHECK_FUNCS([fork]) - dnl check for fseeko() AC_FUNC_FSEEKO dnl check for ftello() diff --git a/gst/gstregistry.c b/gst/gstregistry.c index 7b035a6..e277742 100644 --- a/gst/gstregistry.c +++ b/gst/gstregistry.c @@ -97,9 +97,6 @@ #ifdef HAVE_UNISTD_H #include #endif -#ifdef HAVE_FORK -#include -#endif /* HAVE_FORK */ #include #include #include @@ -125,11 +122,7 @@ static GStaticMutex _gst_registry_mutex = G_STATIC_MUTEX_INIT; static GstRegistry *_gst_registry_default = NULL; /* defaults */ -#if defined(HAVE_FORK) && !defined(GST_HAVE_UNSAFE_FORK) #define DEFAULT_FORK TRUE -#else -#define DEFAULT_FORK FALSE -#endif /* HAVE_FORK */ /* control the behaviour of registry rebuild */ static gboolean _gst_enable_registry_fork = DEFAULT_FORK; @@ -1436,14 +1429,15 @@ ensure_current_registry (GError ** error) /** * gst_registry_fork_is_enabled: * - * By default GStreamer will perform a fork() when scanning and rebuilding the - * registry file. + * By default GStreamer will perform scanning and rebuilding of the + * registry file using a helper child process. * * Applications might want to disable this behaviour with the - * gst_registry_fork_set_enabled() function. + * gst_registry_fork_set_enabled() function, in which case new plugins + * are scanned (and loaded) into the application process. * - * Returns: %TRUE if GStreamer will use fork() when rebuilding the registry. On - * platforms without fork(), this function will always return %FALSE. + * Returns: %TRUE if GStreamer will use the child helper process when + * rebuilding the registry. * * Since: 0.10.10 */ @@ -1455,22 +1449,18 @@ gst_registry_fork_is_enabled (void) /** * gst_registry_fork_set_enabled: - * @enabled: whether rebuilding the registry may fork - * - * Applications might want to disable/enable the usage of fork() when rebuilding - * the registry. See gst_registry_fork_is_enabled() for more information. + * @enabled: whether rebuilding the registry can use a temporary child helper process. * - * On platforms without fork(), this function will have no effect on the return - * value of gst_registry_fork_is_enabled(). + * Applications might want to disable/enable spawning of a child helper process + * when rebuilding the registry. See gst_registry_fork_is_enabled() for more + * information. * * Since: 0.10.10 */ void gst_registry_fork_set_enabled (gboolean enabled) { -#ifdef HAVE_FORK _gst_enable_registry_fork = enabled; -#endif /* HAVE_FORK */ } /** -- 2.7.4