mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
libsysprof-capture: add API to duplicate underlying write FD
This is useful for use in our other libraries that may need access to these to create document loaders for a completed writer.
This commit is contained in:
@ -1704,3 +1704,14 @@ _sysprof_capture_writer_add_raw (SysprofCaptureWriter *self,
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
_sysprof_capture_writer_dup_fd (SysprofCaptureWriter *self)
|
||||||
|
{
|
||||||
|
assert (self != NULL);
|
||||||
|
|
||||||
|
if (self->fd == -1)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
return dup (self->fd);
|
||||||
|
}
|
||||||
|
|||||||
@ -244,5 +244,7 @@ SYSPROF_INTERNAL
|
|||||||
bool _sysprof_capture_writer_set_time_range (SysprofCaptureWriter *self,
|
bool _sysprof_capture_writer_set_time_range (SysprofCaptureWriter *self,
|
||||||
int64_t start_time,
|
int64_t start_time,
|
||||||
int64_t end_time) SYSPROF_INTERNAL;
|
int64_t end_time) SYSPROF_INTERNAL;
|
||||||
|
SYSPROF_INTERNAL
|
||||||
|
int _sysprof_capture_writer_dup_fd (SysprofCaptureWriter *self);
|
||||||
|
|
||||||
SYSPROF_END_DECLS
|
SYSPROF_END_DECLS
|
||||||
|
|||||||
Reference in New Issue
Block a user