--- Begin Message ---
Subject: |
grep: (standard input): Invalid argument |
Date: |
Mon, 12 Dec 2016 11:10:48 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
$ grep ^Sig < /proc/self/status >/dev/null
grep: (standard input): Invalid argument
$ strace -e lseek grep ^Sig < /proc/self/status >/dev/null
lseek(0, 0, SEEK_CUR) = 0
lseek(0, 0, SEEK_END) = -1 EINVAL (Invalid argument)
grep: (standard input): Invalid argument
+++ exited with 2 +++
Andreas.
--
Andreas Schwab, SUSE Labs, address@hidden
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#25180: grep: (standard input): Invalid argument |
Date: |
Mon, 12 Dec 2016 08:40:09 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 |
Thanks, I didn't know about that lseek glitch with the proc file system.
I installed the attached patch to the grep master.
The use case seems unusual. Did a user discover this in practice?
0001-grep-work-around-proc-lseek-glitch.patch
Description: Source code patch
--- End Message ---