[sysprof/wip/chergert/control-fd] control-fd: unlink temporary files during cleanup



commit 43e7882abd8a1a22bcd1480e7294a23b1a7d3b6c
Author: Christian Hergert <chergert redhat com>
Date:   Tue Feb 11 15:14:00 2020 -0800

    control-fd: unlink temporary files during cleanup

 src/libsysprof/sysprof-control-source.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/libsysprof/sysprof-control-source.c b/src/libsysprof/sysprof-control-source.c
index df11c18..89a7ac9 100644
--- a/src/libsysprof/sysprof-control-source.c
+++ b/src/libsysprof/sysprof-control-source.c
@@ -24,6 +24,7 @@
 
 #include <fcntl.h>
 #include <glib-unix.h>
+#include <glib/gstdio.h>
 #include <gio/gunixfdlist.h>
 #include <gio/gunixinputstream.h>
 #include <gio/gunixoutputstream.h>
@@ -293,6 +294,8 @@ sysprof_control_source_supplement (SysprofSource        *source,
 
           close (fd);
         }
+
+      g_unlink (filename);
     }
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]