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
This commit is contained in:
commit
7206c4fc60
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user