From 9f1bef5b1deeb652e26a63a9f636062008510908 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 11 Oct 2006 12:16:05 +0000 Subject: [PATCH] gst/gst.c: Check return value of write() to make compiler happy. Original commit message from CVS: * gst/gst.c: (ensure_current_registry_forking): Check return value of write() to make compiler happy. --- ChangeLog | 5 +++++ gst/gst.c | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index e743a93..4f9c3f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-10-11 Tim-Philipp Müller + + * gst/gst.c: (ensure_current_registry_forking): + Check return value of write() to make compiler happy. + 2006-10-11 Wim Taymans Patch by: Sjoerd Simons diff --git a/gst/gst.c b/gst/gst.c index 9e92bf0..554b4da 100644 --- a/gst/gst.c +++ b/gst/gst.c @@ -303,8 +303,8 @@ gst_init_get_option_group (void) "GST_AUTOPLUG:5,GST_ELEMENT_*:3"), N_("LIST")}, {"gst-debug-no-color", 0, G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, - (gpointer) parse_goption_arg, N_("Disable colored debugging output"), - NULL}, + (gpointer) parse_goption_arg, N_("Disable colored debugging output"), + NULL}, {"gst-debug-disable", 0, G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, (gpointer) parse_goption_arg, N_("Disable debugging"), NULL}, #endif @@ -738,7 +738,9 @@ ensure_current_registry_forking (GstRegistry * default_registry, /* write a result byte to the pipe */ res_byte = res ? '1' : '0'; - write (pfd[1], &res_byte, 1); + if (write (pfd[1], &res_byte, 1) != 1 || close (pfd[1]) != 0) { + /* could not write to pipe, probably means parent has exited before us */ + } _exit (0); } else { int ret; -- 2.7.4