From 4a827e11b470773199e2daa74ae5a3719f6cbb5e Mon Sep 17 00:00:00 2001 From: Peter Seiderer Date: Thu, 12 Dec 2019 11:39:56 +0100 Subject: [PATCH] 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 --- gst/gstpluginloader.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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);