Reflect latest interface changes; return 0 on success and -1 on error.

This commit is contained in:
Martin Baulig
1999-11-21 16:54:36 +00:00
parent cdc8e43a79
commit 81176f8181
20 changed files with 158 additions and 53 deletions

View File

@@ -35,6 +35,8 @@ int
glibtop_init_proc_signal_s (glibtop *server)
{
server->sysdeps.proc_signal = _glibtop_sysdeps_proc_signal;
return 0;
}
/* Provides detailed information about a process. */
@@ -49,10 +51,10 @@ glibtop_get_proc_signal_s (glibtop *server, glibtop_proc_signal *buf, pid_t pid)
memset (buf, 0, sizeof (glibtop_proc_signal));
if (proc_stat_to_buffer (buffer, pid))
return;
return -1;
p = proc_stat_after_cmd (buffer);
if (!p) return;
if (!p) return -1;
p = skip_multiple_token (p, 28);
@@ -62,4 +64,6 @@ glibtop_get_proc_signal_s (glibtop *server, glibtop_proc_signal *buf, pid_t pid)
buf->sigcatch [0] = strtoul (p, &p, 0);
buf->flags = _glibtop_sysdeps_proc_signal;
return 0;
}