summaryrefslogtreecommitdiff
path: root/examples/wd.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/wd.c')
-rw-r--r--examples/wd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/wd.c b/examples/wd.c
index 4cb51a3b..353a4662 100644
--- a/examples/wd.c
+++ b/examples/wd.c
@@ -13,6 +13,8 @@ int main(int argc, char **argv)
if (argc < 2 || !(pid = strtoul(argv[1], NULL, 0)))
pid = getpid();
+ glibtop_init();
+
dirs = glibtop_get_proc_wd(&buf, pid);
g_print("Process %u:\n"
@@ -26,6 +28,8 @@ int main(int argc, char **argv)
g_strfreev(dirs);
+ glibtop_close();
+
return 0;
}