sysprofd: add API to get a FD for a file in proc

This is useful for optimized parsing of proc files such as necessary by
the memory source to seek() back to the start (instead of re-opening a
new file).
This commit is contained in:
Christian Hergert
2019-05-12 16:06:02 -07:00
parent 16bc6f970e
commit 9d72203687
6 changed files with 142 additions and 1 deletions

View File

@ -54,6 +54,11 @@ gboolean sysprof_helpers_list_processes_finish (SysprofHelpers
gint32 **processes,
gsize *n_processes,
GError **error);
gboolean sysprof_helpers_get_proc_fd (SysprofHelpers *self,
const gchar *path,
GCancellable *cancellable,
gint *out_fd,
GError **error);
gboolean sysprof_helpers_get_proc_file (SysprofHelpers *self,
const gchar *path,
GCancellable *cancellable,