Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* If file argument exists but cannot be opened, grep was skipping the file with a strange "binary file" message * I found this when testing "grep -s", which is expected to exit with 2 if a file couldn't be opened * I triggered open() error by removing file permissions on my Linux system %chmod 0 a.c %perl grep -T include a.c grep: skipping binary file "a.c" * Correct the binary file condition; skip the file argument if file is binary (filetest -B) and we're not running grep -a * Correct the logic for exit code; $Errors should increment regardless of -s because exit code is determined from it * Bump version * Regression test: "perl grep -s pat1 bad.file.name" --> exit 2, silent
- Loading branch information