6782 /bin/head experiences issues when accessing /dev/zero

Review Request #180 - Created March 23, 2016 and updated

Information
Richard PALO
illumos-gate
6782
Reviewers
general
6782 /bin/head experiences issues when accessing /dev/zero

richard@omnis:/home/richard/src/illumos-gate/usr/src/cmd/head$ ./head  head.c |wc -l
      10
richard@omnis:/home/richard/src/illumos-gate/usr/src/cmd/head$ ./head  head.c |wc -c
     363
richard@omnis:/home/richard/src/illumos-gate/usr/src/cmd/head$ ./head -c 363 head.c |wc -l
      10
richard@omnis:/home/richard/src/illumos-gate/usr/src/cmd/head$ ./head -c 363 head.c |wc -c
     363
richard@omnis:/home/richard/src/illumos-gate/usr/src/cmd/head$ ./head -c 1 /dev/zero |wc -c
       1
richard@omnis:/home/richard/src/illumos-gate/usr/src/cmd/head$ ./head -c 10 /dev/zero |wc -c
      10
richard@omnis:/home/richard/src/illumos-gate/usr/src/cmd/head$ ./head -c 1 /tmp/fooz |wc -c
       1
richard@omnis:/home/richard/src/illumos-gate/usr/src/cmd/head$ ./head -c 10 /tmp/fooz |wc -c
       1

cstyled as well.

Loading...