|
Bugzilla – Full Text Bug Listing |
| Summary: | Piping into grep fails with EPIPE | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 12.2 | Reporter: | Manuel Stol <ManuelStol> |
| Component: | Basesystem | Assignee: | E-mail List <bnc-team-screening> |
| Status: | RESOLVED INVALID | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Major | ||
| Priority: | P5 - None | ||
| Version: | Factory | ||
| Target Milestone: | --- | ||
| Hardware: | x86-64 | ||
| OS: | openSUSE 12.2 | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: |
strace of (echo "foobar" | grep "foo")
strace of (echo "foobar" | sed "s/foo/XXX/") |
||
Created attachment 482858 [details]
strace of (echo "foobar" | sed "s/foo/XXX/")
- I'm using 'secure' permissions. PERMISSION_SECURITY="secure local" in '/etc/sysconfig/security' As POLKIT_DEFAULT_PRIVS is unset, PolicyKit uses 'restrictive' privilege settings. Changing the file permissions or PolicyKit privilege settings did not help. When I add a new user, this new user does not have the 'piping to grep' problem. So my user settings must be borked. Can anyone tell me how to debug this? Resolved. For over a decade I used the following in my profile: " # Do not grep devices! The keyboard becomes unusable when grepping on it. export GREP_OPTIONS="--devices=skip" " It looks that in the latest Linux kernel piping is/uses a FIFO device. |
Created attachment 482857 [details] strace of (echo "foobar" | grep "foo") User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.34 (KHTML, like Gecko) konqueror/4.8.1 Safari/534.34 Piping stdout into grep fails with an EPIPE. Reproducible: Always Steps to Reproduce: 1. Open a terminal (xterm, konsole) as a normal user. 2. type: echo "foobar" | grep "foo" Actual Results: No output to stdout due to an EPIPE error. Expected Results: The lines that match the grep pattern. - This doesn't happen when opening a terminal as root nor when switching to root with 'su -'. - Neither grep nor egrep work. - When replacing grep with sed, piping works as expected. - Tried it with konsole, xterm and linux 32-bit terminal. - I've been updating my system since openSUSE 11.4. - I've re-intalled the grep rpm. - YaST does not start on a 64bit system, as grep is used in /usr/lib/YaST2/bin/yast2-funcs Workaround: Start YaST with '--qt' or '--gtk'.