mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof-capture: Use POSIX environment functions instead of GLib ones
They are equivalent. Signed-off-by: Philip Withnall <withnall@endlessm.com> Helps: #40
This commit is contained in:
@ -1361,7 +1361,7 @@ sysprof_capture_writer_new_from_env (size_t buffer_size)
|
|||||||
const char *fdstr;
|
const char *fdstr;
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
if (!(fdstr = g_getenv ("SYSPROF_TRACE_FD")))
|
if (!(fdstr = getenv ("SYSPROF_TRACE_FD")))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
/* Make sure the clock is initialized */
|
/* Make sure the clock is initialized */
|
||||||
|
|||||||
@ -131,13 +131,13 @@ request_writer (void)
|
|||||||
|
|
||||||
if (conn == NULL)
|
if (conn == NULL)
|
||||||
{
|
{
|
||||||
const char *fdstr = g_getenv ("SYSPROF_CONTROL_FD");
|
const char *fdstr = getenv ("SYSPROF_CONTROL_FD");
|
||||||
int peer_fd = -1;
|
int peer_fd = -1;
|
||||||
|
|
||||||
if (fdstr != NULL)
|
if (fdstr != NULL)
|
||||||
peer_fd = atoi (fdstr);
|
peer_fd = atoi (fdstr);
|
||||||
|
|
||||||
g_unsetenv ("SYSPROF_CONTROL_FD");
|
unsetenv ("SYSPROF_CONTROL_FD");
|
||||||
|
|
||||||
if (peer_fd > 0)
|
if (peer_fd > 0)
|
||||||
{
|
{
|
||||||
@ -251,7 +251,7 @@ sysprof_collector_get (void)
|
|||||||
self->tid = self->pid;
|
self->tid = self->pid;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (g_getenv ("SYSPROF_CONTROL_FD") != NULL)
|
if (getenv ("SYSPROF_CONTROL_FD") != NULL)
|
||||||
self->buffer = request_writer ();
|
self->buffer = request_writer ();
|
||||||
|
|
||||||
if (self->is_shared)
|
if (self->is_shared)
|
||||||
|
|||||||
Reference in New Issue
Block a user