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 <ps.report@gmx.net>
This commit is contained in:
Peter Seiderer 2019-12-12 11:39:56 +01:00
parent 96aa27910a
commit 4a827e11b4

View file

@ -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);