diff options
author | Benoît Dejean <bdejean@src.gnome.org> | 2007-09-21 22:26:18 +0000 |
---|---|---|
committer | Benoît Dejean <bdejean@src.gnome.org> | 2007-09-21 22:26:18 +0000 |
commit | 771f0848b352f0586ee687077f2548e379745b02 (patch) | |
tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 /examples/procargs.c | |
parent | fcee021a2d23a8c1d84e1c6411f2d2561514a5aa (diff) | |
download | libgtop-affinity.tar.gz |
Killed branch. SVN SUCKS.affinity
Killed branch.
SVN SUCKS.
svn path=/branches/affinity; revision=2662
Diffstat (limited to 'examples/procargs.c')
-rw-r--r-- | examples/procargs.c | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/examples/procargs.c b/examples/procargs.c deleted file mode 100644 index d5bd1fdd..00000000 --- a/examples/procargs.c +++ /dev/null @@ -1,51 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#include <glibtop.h> -#include <glibtop/procargs.h> - -#include <stdlib.h> - -#include <unistd.h> - -static void show_args(pid_t pid, unsigned max_len) -{ - glibtop_proc_args buf; - char ** const pargv = glibtop_get_proc_argv(&buf, pid, max_len); - - char **parg = pargv; - - printf("<%ld>\t", (long)pid); - - while(*parg) - { - printf("\"%s\" ", *parg); - parg++; - } - - putchar('\n'); - - g_strfreev(pargv); -} - - -int main(int argc, char **argv) -{ - glibtop_init(); - - show_args(getpid(), 0); - show_args(getpid(), 15); - - while(*++argv) - { - pid_t pid = strtol(*argv, NULL, 10); - show_args(pid, 0); - show_args(pid, 15); - } - - glibtop_close(); - - return 0; -} - |