diff options
author | delphij <delphij@FreeBSD.org> | 2016-05-08 09:30:36 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2016-05-08 09:30:36 +0000 |
commit | 4c938783e676a5a9a427dcd7d184f6de3cc96ecd (patch) | |
tree | 1aeb5384ef448d3055bfd1f829073d8b623e8d54 | |
parent | a172d95fac235c55facc30336d520e2918021f8d (diff) | |
download | FreeBSD-src-4c938783e676a5a9a427dcd7d184f6de3cc96ecd.zip FreeBSD-src-4c938783e676a5a9a427dcd7d184f6de3cc96ecd.tar.gz |
MFV r299233: Apply upstream fix 11edb37a71851b5bcbd4e51ca6ad3dcbf57e9761:
Revert: Don't close stdin...
This have been observed by portupgrade in its interaction with file(1),
as reported as a regression in bin/209211.
PR: 209211
MFC after: 3 days
-rw-r--r-- | contrib/file/src/magic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/file/src/magic.c b/contrib/file/src/magic.c index 315a944..8cf6269 100644 --- a/contrib/file/src/magic.c +++ b/contrib/file/src/magic.c @@ -346,7 +346,7 @@ private void close_and_restore(const struct magic_set *ms, const char *name, int fd, const struct stat *sb) { - if (name == NULL) + if (fd == STDIN_FILENO || name == NULL) return; (void) close(fd); |