Drop usage of formatted error messages from <err.h>

They do not clean up the ncurses environment, leaving the terminal in a
broken state.

Also drop bare usage of exit(3).
This commit is contained in:
Christian Göttsche
2021-01-07 16:08:43 +01:00
parent 27db9297b7
commit d800d7a3ce
5 changed files with 10 additions and 20 deletions

View File

@ -9,7 +9,6 @@ in the source distribution for its full text.
#include <assert.h>
#include <dirent.h>
#include <err.h>
#include <limits.h>
#include <stdlib.h>
#include <string.h>
@ -145,7 +144,7 @@ ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidMatchList, ui
fpl->kd = kvm_openfiles(NULL, "/dev/null", NULL, 0, errbuf);
if (fpl->kd == NULL) {
errx(1, "kvm_open: %s", errbuf);
CRT_fatalError("kvm_openfiles() failed");
}
fpl->ttys = Hashtable_new(20, true);