sigaction(SIGINT, &act, 0);
sigaction(SIGTERM, &act, 0);
- dpy = XOpenDisplay(NULL);
+ if (!oflag) {
+ dpy = XOpenDisplay(NULL);
+ }
while (!done) {
status_string[0] = '\0';
if (!oflag) {
set_status(NULL);
+ XCloseDisplay(dpy);
}
- XCloseDisplay(dpy);
-
return 0;
}