[sysprof/wip/chergert/sysprof-3] libsysprof: clear trace fd after reading



commit a751ce89b69aeb386d63e5b0e327c16968c9289d
Author: Christian Hergert <chergert redhat com>
Date:   Fri May 24 16:05:26 2019 -0700

    libsysprof: clear trace fd after reading

 src/libsysprof/sysprof-tracefd-source.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/src/libsysprof/sysprof-tracefd-source.c b/src/libsysprof/sysprof-tracefd-source.c
index 5a57c55..dba0b56 100644
--- a/src/libsysprof/sysprof-tracefd-source.c
+++ b/src/libsysprof/sysprof-tracefd-source.c
@@ -258,6 +258,8 @@ sysprof_tracefd_source_stop (SysprofSource *source)
 
       if ((reader = sysprof_capture_reader_new_from_fd (priv->tracefd, 0)))
         sysprof_capture_writer_cat (priv->writer, reader, NULL);
+
+      priv->tracefd = -1;
     }
 
   sysprof_source_emit_finished (source);


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