No longer abort() is no such pid. buf.flags == 0ULL means that there no
* procargs.c: (glibtop_get_proc_args_s): * prockernel.c: (glibtop_get_proc_kernel_s): * procmem.c: (glibtop_get_proc_mem_s): * procsegment.c: (glibtop_get_proc_segment_s): * procsignal.c: (glibtop_get_proc_signal_s): * procstate.c: (glibtop_get_proc_state_s): * proctime.c: (glibtop_get_proc_time_s): * procuid.c: (glibtop_get_proc_uid_s): No longer abort() is no such pid. buf.flags == 0ULL means that there no data could be retrieve at all. Closes #154876. Thanks to Christophe Belle.
This commit is contained in:
@@ -1,3 +1,16 @@
|
||||
2004-10-22 Benoît Dejean <tazforever@dlfp.org>
|
||||
|
||||
* procargs.c: (glibtop_get_proc_args_s):
|
||||
* prockernel.c: (glibtop_get_proc_kernel_s):
|
||||
* procmem.c: (glibtop_get_proc_mem_s):
|
||||
* procsegment.c: (glibtop_get_proc_segment_s):
|
||||
* procsignal.c: (glibtop_get_proc_signal_s):
|
||||
* procstate.c: (glibtop_get_proc_state_s):
|
||||
* proctime.c: (glibtop_get_proc_time_s):
|
||||
* procuid.c: (glibtop_get_proc_uid_s): No longer abort() is no such pid.
|
||||
buf.flags == 0ULL means that there no data could be retrieve at all.
|
||||
Closes #154876. Thanks to Christophe Belle.
|
||||
|
||||
2004-10-04 Benoît Dejean <tazforever@dlfp.org>
|
||||
|
||||
* procstate.c: (glibtop_get_proc_state_s): Fixed .state to follow
|
||||
|
@@ -67,12 +67,7 @@ glibtop_get_proc_args_s (glibtop *server, glibtop_proc_args *buf,
|
||||
memset (buf, 0, sizeof (glibtop_proc_args));
|
||||
|
||||
pinfo = _glibtop_get_procinfo(server, pid);
|
||||
if (pinfo == NULL)
|
||||
{
|
||||
glibtop_error_io_r (server, "Cannot read procsinfo");
|
||||
|
||||
return NULL;
|
||||
}
|
||||
if (pinfo == NULL) return NULL;
|
||||
|
||||
size = max_len != 0 ? max_len : 4096;
|
||||
args_buffer = g_malloc (size);
|
||||
|
@@ -62,12 +62,7 @@ glibtop_get_proc_kernel_s (glibtop *server, glibtop_proc_kernel *buf,
|
||||
memset (buf, 0, sizeof (glibtop_proc_kernel));
|
||||
|
||||
pinfo = _glibtop_get_procinfo(server, pid);
|
||||
if (pinfo == NULL)
|
||||
{
|
||||
glibtop_error_io_r(server, "Cannot read procsinfo");
|
||||
|
||||
return;
|
||||
}
|
||||
if (pinfo == NULL) return;
|
||||
|
||||
if (!(pinfo->pi_flags | SKPROC))
|
||||
{
|
||||
|
@@ -58,12 +58,7 @@ glibtop_get_proc_mem_s (glibtop *server, glibtop_proc_mem *buf,
|
||||
memset (buf, 0, sizeof (glibtop_proc_mem));
|
||||
|
||||
pinfo = _glibtop_get_procinfo(server, pid);
|
||||
if (pinfo == NULL)
|
||||
{
|
||||
glibtop_error_io_r (server, "Cannot read procsinfo");
|
||||
|
||||
return;
|
||||
}
|
||||
if (pinfo == NULL) return;
|
||||
|
||||
pagesize = sysconf(_SC_PAGESIZE);
|
||||
|
||||
|
@@ -58,12 +58,7 @@ glibtop_get_proc_segment_s (glibtop *server, glibtop_proc_segment *buf,
|
||||
memset (buf, 0, sizeof (glibtop_proc_segment));
|
||||
|
||||
pinfo = _glibtop_get_procinfo(server, pid);
|
||||
if (pinfo == NULL)
|
||||
{
|
||||
glibtop_error_io_r (server, "Cannot read procsinfo");
|
||||
|
||||
return;
|
||||
}
|
||||
if (pinfo == NULL) return;
|
||||
|
||||
pagesize = sysconf(_SC_PAGESIZE);
|
||||
|
||||
|
@@ -59,12 +59,7 @@ glibtop_get_proc_signal_s (glibtop *server, glibtop_proc_signal *buf,
|
||||
memset (buf, 0, sizeof (glibtop_proc_signal));
|
||||
|
||||
pinfo = _glibtop_get_procinfo(server, pid);
|
||||
if (pinfo == NULL)
|
||||
{
|
||||
glibtop_error_io_r (server, "Cannot read procsinfo");
|
||||
|
||||
return;
|
||||
}
|
||||
if (pinfo == NULL) return;
|
||||
|
||||
/* pending signals */
|
||||
|
||||
|
@@ -58,12 +58,7 @@ glibtop_get_proc_state_s (glibtop *server, glibtop_proc_state *buf,
|
||||
memset (buf, 0, sizeof (glibtop_proc_state));
|
||||
|
||||
pinfo = _glibtop_get_procinfo(server, pid);
|
||||
if (pinfo == NULL)
|
||||
{
|
||||
glibtop_error_io_r(server, "Cannot read procsinfo");
|
||||
|
||||
return;
|
||||
}
|
||||
if (pinfo == NULL) return;
|
||||
|
||||
if (pinfo->pi_pid == 0)
|
||||
{
|
||||
|
@@ -56,11 +56,7 @@ glibtop_get_proc_time_s (glibtop *server, glibtop_proc_time *buf,
|
||||
memset (buf, 0, sizeof (glibtop_proc_time));
|
||||
|
||||
pinfo = _glibtop_get_procinfo(server, pid);
|
||||
if (pinfo == NULL)
|
||||
{
|
||||
glibtop_error_io_r (server, "Cannot read procsinfo");
|
||||
return;
|
||||
}
|
||||
if (pinfo == NULL) return;
|
||||
|
||||
buf->start_time = pinfo->pi_start;
|
||||
buf->utime = pinfo->pi_ru.ru_utime.tv_sec + (double)pinfo->pi_ru.ru_utime.tv_usec/1000000.0;
|
||||
|
@@ -64,12 +64,7 @@ glibtop_get_proc_uid_s (glibtop *server, glibtop_proc_uid *buf,
|
||||
memset (buf, 0, sizeof (glibtop_proc_uid));
|
||||
|
||||
pinfo = _glibtop_get_procinfo(server, pid);
|
||||
if (pinfo == NULL)
|
||||
{
|
||||
glibtop_error_io_r (server, "Cannot read procsinfo");
|
||||
|
||||
return;
|
||||
}
|
||||
if (pinfo == NULL) return;
|
||||
|
||||
buf->uid = pinfo->pi_cred.cr_ruid;
|
||||
buf->euid = pinfo->pi_cred.cr_uid;
|
||||
|
Reference in New Issue
Block a user