Subject: bug#25180: closed (Re: bug#25180: grep: (standard input): Invalid argument)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 12 Dec 2016 16:41:02 +0000

Your bug report

#25180: grep: (standard input): Invalid argument

which was filed against the grep package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
25180: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=25180
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#25180: grep: (standard input): Invalid argument
From: Paul Eggert <[email-masked]>
To: Andreas Schwab <[email-masked]>, [email-masked]
Date: Mon, 12 Dec 2016 08:40:09 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

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?

Subject: grep: (standard input): Invalid argument
From: Andreas Schwab <[email-masked]>
To: [email-masked]
Date: Mon, 12 Dec 2016 11:10:48 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

$ 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, [email-masked]
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."