Actions
Bug #5221
closedhead shouldn't reuse stdin
Start date:
2014-10-08
Due date:
% Done:
100%
Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
Description
Because head freopen's stdin and it closes it, it fails to properly handle cases where we actually have data passed into us and /dev/stdin is an explicit file given to head. This is similar to the OpenBSD bug pointed out here: http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/head/head.c#rev1.18.
Actions