lobase

Linux port of OpenBSDs userland.
Log | Files | Refs | README

commit 8802ca1f8106321a86224f78d73f0141fe22356d
parent 6488f4f09ed83692451bae5a666ccf1369b39a1a
Author: Duncaen <mail@duncano.de>
Date:   Fri, 19 May 2017 18:03:39 +0200

usr.bin/tee: update to OPENBSD_6_1

Diffstat:
usr.bin/tee/tee.c | 17+++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/usr.bin/tee/tee.c b/usr.bin/tee/tee.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tee.c,v 1.10 2015/10/09 01:37:09 deraadt Exp $ */ +/* $OpenBSD: tee.c,v 1.11 2016/10/28 07:22:59 schwarze Exp $ */ /* $NetBSD: tee.c,v 1.5 1994/12/09 01:43:39 jtc Exp $ */ /* @@ -32,15 +32,15 @@ #include <sys/types.h> #include <sys/stat.h> -#include <signal.h> + +#include <err.h> #include <errno.h> #include <fcntl.h> -#include <unistd.h> +#include <signal.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <locale.h> -#include <err.h> +#include <unistd.h> struct list { struct list *next; @@ -72,8 +72,6 @@ main(int argc, char *argv[]) int append, ch, exitval; char buf[8192]; - setlocale(LC_ALL, ""); - if (pledge("stdio wpath cpath", NULL) == -1) err(1, "pledge"); @@ -86,10 +84,9 @@ main(int argc, char *argv[]) case 'i': (void)signal(SIGINT, SIG_IGN); break; - case '?': default: (void)fprintf(stderr, "usage: tee [-ai] [file ...]\n"); - exit(1); + return 1; } } argv += optind; @@ -137,5 +134,5 @@ main(int argc, char *argv[]) } } - exit(exitval); + return exitval; }