From: Peter Seiderer Date: Thu, 12 Dec 2019 10:39:56 +0000 (+0100) Subject: pluginloader: handle fsync interrupted by signal (EINTR) X-Git-Tag: 1.19.3~1023 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4a827e11b470773199e2daa74ae5a3719f6cbb5e;p=platform%2Fupstream%2Fgstreamer.git pluginloader: handle fsync interrupted by signal (EINTR) According to [1] EINTR is a possible errno for fsync(), so handle it as all other EINTR (do/while(errno == EINTR)). Signed-off-by: Peter Seiderer --- diff --git a/gst/gstpluginloader.c b/gst/gstpluginloader.c index a933a4bc4e..d1e404d98e 100644 --- a/gst/gstpluginloader.c +++ b/gst/gstpluginloader.c @@ -171,8 +171,11 @@ plugin_loader_free (GstPluginLoader * loader) { GList *cur; gboolean got_plugin_details; + gint fsync_ret; - fsync (loader->fd_w.fd); + do { + fsync_ret = fsync (loader->fd_w.fd); + } while (fsync_ret < 0 && errno == EINTR); if (loader->child_running) { put_packet (loader, PACKET_EXIT, 0, NULL, 0);