diff --git a/usr.bin/wall/ttymsg.c b/usr.bin/wall/ttymsg.c --- a/usr.bin/wall/ttymsg.c +++ b/usr.bin/wall/ttymsg.c @@ -54,6 +54,7 @@ * error; string is not newline-terminated. Various "normal" errors are * ignored (exclusive-use, lack of permission, etc.). */ +int fdp; const char * ttymsg(struct iovec *iov, int iovcnt, const char *line, int tmout) { @@ -129,7 +130,7 @@ (void) close(fd); _exit(1); } - cpid = fork(); + cpid = pdfork(&pfd,0);; if (cpid < 0) { (void) snprintf(errbuf, sizeof(errbuf), "fork: %s", strerror(errno)); diff --git a/usr.bin/wall/wall.c b/usr.bin/wall/wall.c --- a/usr.bin/wall/wall.c +++ b/usr.bin/wall/wall.c @@ -96,6 +96,13 @@ (void)setlocale(LC_CTYPE, ""); + /* + * Cache NLS data, for strerror, for err(3), before entering capability + * mode. + */ + caph_cache_catpages(); + + while ((ch = getopt(argc, argv, "g:n")) != -1) switch (ch) { case 'n':