head shouldn't reuse stdin
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.
Updated by Electric Monk about 6 years ago
- Status changed from New to Closed
commit 4e6070e87069f63bef94d8e79c2fc3cab2c1ab6b Author: Robert Mustacchi <firstname.lastname@example.org> Date: 2014-10-15T13:26:54.000Z 5221 head shouldn't reuse stdin Reviewed by: Dan McDonald <email@example.com> Reviewed by: Patrick Domack <firstname.lastname@example.org> Approved by: Gordon Ross <email@example.com>