Without root priviledges, reading only the user's own processes is
possible. Thus, the results usually don't contain all of the possible
results.
Signed-off-by: Timo Kokkonen <kaapeli@itanic.dy.fi>
#include <string.h>
#include <errno.h>
#include <getopt.h>
+#include <unistd.h>
+#include <sys/types.h>
#include "parse.h"
#include "analyze.h"
struct process *process_list = NULL;
struct parse_opts opts;
+ if (getuid()) {
+ printf("WARNING: Running without root priviledges. "
+ "Results may be inaccurate\n");
+ }
+
memset(&opts, 0, sizeof(opts));
read_args(argc, argv, &opts);