summaryrefslogtreecommitdiff
path: root/src/tee.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1993-10-04 21:20:37 +0000
committerJim Meyering <jim@meyering.net>1993-10-04 21:20:37 +0000
commit3134fad324dee63431db43cf9fc82072cb004770 (patch)
treebed6afd9e143b51ee02ee2aa84a81a020daf3e15 /src/tee.c
parentae0074289cd7d70cf8fb1d96f2625b2b9bb62b29 (diff)
downloadcoreutils-3134fad324dee63431db43cf9fc82072cb004770.tar.xz
merge with 1.8.1a
Diffstat (limited to 'src/tee.c')
-rw-r--r--src/tee.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tee.c b/src/tee.c
index b97821c8d..941507fec 100644
--- a/src/tee.c
+++ b/src/tee.c
@@ -77,23 +77,23 @@ Usage: %s [-ai] [--append] [--ignore-interrupts] [file...]\n",
}
if (ignore_interrupts)
-#ifdef _POSIX_VERSION
{
+#ifdef _POSIX_VERSION
struct sigaction sigact;
sigact.sa_handler = SIG_IGN;
sigemptyset (&sigact.sa_mask);
sigact.sa_flags = 0;
sigaction (SIGINT, &sigact, NULL);
- }
#else /* !_POSIX_VERSION */
- signal (SIGINT, SIG_IGN);
+ signal (SIGINT, SIG_IGN);
#endif /* _POSIX_VERSION */
+ }
errs = tee (argc - optind, &argv[optind]);
- if (close (0) == -1)
+ if (close (0) != 0)
error (1, errno, "standard input");
- if (close (1) == -1)
+ if (close (1) != 0)
error (1, errno, "standard output");
exit (errs);
}
@@ -143,7 +143,7 @@ tee (nfiles, files)
}
for (i = 0; i < nfiles; i++)
- if (descriptors[i] != -1 && close (descriptors[i]) == -1)
+ if (descriptors[i] != -1 && close (descriptors[i]) != 0)
{
error (0, errno, "%s", files[i]);
ret = 1;