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