[Bug 793536] New: ps axfl output not being folded when piped
https://bugzilla.novell.com/show_bug.cgi?id=793536 https://bugzilla.novell.com/show_bug.cgi?id=793536#c0 Summary: ps axfl output not being folded when piped Classification: openSUSE Product: openSUSE 12.2 Version: Final Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: per@computer.org QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:11.0) Gecko/20100101 Firefox/11.0 If I do "ps axfl" and some of the output is wider than my terminal window, the lines are truncated. This is normal. If I do "ps axfl | grep some", on an 11.0 system, the output is folded (as with "ps axflww"), and I get to see the entire line. On openSUSE 12.2 the output after "ps axfl | grep some" is still truncated. It is as if ps doesn't recognize that the output is being piped? I'm not sure, but I think this behaviour could be very bad for scripts that rely on the earlier behaviour. Reproducible: Always -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=793536 https://bugzilla.novell.com/show_bug.cgi?id=793536#c1 Jiaying ren <jren@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO CC| |jren@suse.com InfoProvider| |per@computer.org --- Comment #1 from Jiaying ren <jren@suse.com> 2012-12-10 05:22:01 UTC --- (In reply to comment #0)
User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:11.0) Gecko/20100101 Firefox/11.0
If I do "ps axfl" and some of the output is wider than my terminal window, the lines are truncated. This is normal.
If I do "ps axfl | grep some", on an 11.0 system, the output is folded (as with "ps axflww"), and I get to see the entire line.
On openSUSE 12.2 the output after "ps axfl | grep some" is still truncated. It is as if ps doesn't recognize that the output is being piped? I'm not sure, but I think this behaviour could be very bad for scripts that rely on the earlier behaviour.
Reproducible: Always
Hi~Per,which shell did you used for testing it?Would you please tell me its version? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=793536 https://bugzilla.novell.com/show_bug.cgi?id=793536#c2 Per Jessen <per@computer.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW InfoProvider|per@computer.org | --- Comment #2 from Per Jessen <per@computer.org> 2012-12-10 07:21:03 UTC --- On 12.2, I'm using bash, bash-4.2-51.6.1.i586. On 11.0, it is also bash, bash-3.2-112.1. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=793536 https://bugzilla.novell.com/show_bug.cgi?id=793536#c Jiaying ren <jren@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team-screening@forge.pr |werner@suse.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=793536 https://bugzilla.novell.com/show_bug.cgi?id=793536#c3 --- Comment #3 from Dr. Werner Fink <werner@suse.com> 2012-12-13 08:07:54 UTC --- I'm not able to reproduce with 12.2: /suse/werner> stty size 42 81 /suse/werner> ps axfl | wc -L 173 that is that the longest line of the ps command is 173 but the XTerm has only 81 columns. Do you have some environment variables set that are accordingly to the manual page of ps: COLUMNS and do have installed all available updates for OS 12.2? Just do a grep -rs /etc/profile.d/ to see where the variable COLUMNS is set. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=793536 https://bugzilla.novell.com/show_bug.cgi?id=793536#c4 --- Comment #4 from Per Jessen <per@computer.org> 2012-12-13 08:48:29 UTC --- (In reply to comment #3)
I'm not able to reproduce with 12.2:
/suse/werner> stty size 42 81 /suse/werner> ps axfl | wc -L 173
that is that the longest line of the ps command is 173 but the XTerm has only 81 columns. Do you have some environment variables set that are accordingly to the manual page of ps:
COLUMNS
and do have installed all available updates for OS 12.2? Just do a
grep -rs /etc/profile.d/
to see where the variable COLUMNS is set.
Hi Werner 12.2 11.0 ------------------------------------------------ stty size 55 236 55 236 ps axf | wc -L 236 344 echo $COLUMNS 236 236 COLUMNS isn't set anywhere in /etc/profile.d/ (on either system). The line that isn't being folded when piped through grep is 293 long: dupont5:~ # ps axfww | grep spamd | wc -L 293 I've just now updated again - this is the list of updates: coreutils findutils glibc glibc-devel glibc-extra glibc-locale iproute2 iptables libiptc0 libopenssl-devel libopenssl1_0_0 libxtables7 openssl sysconfig systemd systemd-sysvinit xen-libs xen-tools-domU After reboot - no change in behaviour wrt this issue. FYI, I'm accessing both systems via ssh from a Konsole window. I don't know if that makes a difference. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=793536 https://bugzilla.novell.com/show_bug.cgi?id=793536#c5 --- Comment #5 from Per Jessen <per@computer.org> 2012-12-13 08:53:28 UTC --- Created an attachment (id=516854) --> (http://bugzilla.novell.com/attachment.cgi?id=516854) screenshot from openSUSE 11.0 system -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=793536 https://bugzilla.novell.com/show_bug.cgi?id=793536#c6 --- Comment #6 from Per Jessen <per@computer.org> 2012-12-13 08:54:06 UTC --- Created an attachment (id=516855) --> (http://bugzilla.novell.com/attachment.cgi?id=516855) screenshot from openSUSE 12.2 system -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=793536 https://bugzilla.novell.com/show_bug.cgi?id=793536#c7 --- Comment #7 from Dr. Werner Fink <werner@suse.com> 2012-12-17 13:05:09 UTC --- As workaround I suggesst unset COLUMNS trap '' SIGWINCH as the bash set automatically the environment variable COLUMNS for the signal WINCH. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=793536 https://bugzilla.novell.com/show_bug.cgi?id=793536#c8 Dr. Werner Fink <werner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO CC| |jengelh@inai.de InfoProvider| |per@computer.org --- Comment #8 from Dr. Werner Fink <werner@suse.com> 2013-01-08 16:58:43 UTC --- Please run printenv | grep COLUMNS somehow this variable is exported by accident. Please not this is not the line export LINES COLUMNS TERM in /etc/profile as this is only active on /dev/console of /dev/tty1 on an iSeries. Therefore this variable is exported at an other place below /etc/ or /usr/share/bash-completion or maybe in your personal setup for the bash like in ~/.profile or ~/.bashrc -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=793536 https://bugzilla.novell.com/show_bug.cgi?id=793536#c9 --- Comment #9 from Dr. Werner Fink <werner@suse.com> 2013-01-08 17:45:56 UTC --- Found this werner/bash> grep COLUMNS -rs bash-4.2 readline-6.2 | grep setenv bash-4.2/lib/readline/shell.c: setenv ("COLUMNS", b, 1); readline-6.2/shell.c: setenv ("COLUMNS", b, 1); -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=793536 https://bugzilla.novell.com/show_bug.cgi?id=793536#c10 --- Comment #10 from Dr. Werner Fink <werner@suse.com> 2013-01-08 17:51:10 UTC --- Submit request #147584 together with submit request #147585 should fix this. Found that enforcing the bash shell option checkwinsize will cause that the variables COLUMNS and LINES become exported variables instead of internal ones. In SR #47584 I've removed enforcing checkwinsize and in SR #147585 I've added # If COLUMNS are within the environment the shell should update # the winsize after each job otherwise the values are wrong case "$(declare -p COLUMNS 2> /dev/null)" in *-x*COLUMNS=*) shopt -s checkwinsize esac in /etc/bash.bashrc for interacrtive shells as this helps to avoid wrong COLUMNS and LINES if during a forground job in the bash the terminal has changed its columns and/or lines. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=793536 https://bugzilla.novell.com/show_bug.cgi?id=793536#c11 --- Comment #11 from Bernhard Wiedemann <bwiedemann@suse.com> 2013-01-08 19:00:17 CET --- This is an autogenerated message for OBS integration: This bug (793536) was mentioned in https://build.opensuse.org/request/show/147584 Factory / bash https://build.opensuse.org/request/show/147585 Factory / aaa_base -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=793536 https://bugzilla.novell.com/show_bug.cgi?id=793536#c12 --- Comment #12 from Bernhard Wiedemann <bwiedemann@suse.com> 2013-01-09 13:00:09 CET --- This is an autogenerated message for OBS integration: This bug (793536) was mentioned in https://build.opensuse.org/request/show/147710 Factory / bash -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=793536 https://bugzilla.novell.com/show_bug.cgi?id=793536#c13 Per Jessen <per@computer.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW InfoProvider|per@computer.org | --- Comment #13 from Per Jessen <per@computer.org> 2013-03-10 10:49:21 UTC --- Werner, are you waiting for input from me? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=793536 https://bugzilla.novell.com/show_bug.cgi?id=793536#c14 --- Comment #14 from Dr. Werner Fink <werner@suse.com> 2013-03-11 07:50:37 UTC --- You may test out the submit requests. Both together should fix the issue. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=793536 https://bugzilla.novell.com/show_bug.cgi?id=793536#c15 --- Comment #15 from Per Jessen <per@computer.org> 2013-03-11 08:13:33 UTC --- (In reply to comment #14)
You may test out the submit requests. Both together should fix the issue.
I've tested this in 12.3rc2, and it looks fine. What about an update for 12.2? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=793536 https://bugzilla.novell.com/show_bug.cgi?id=793536#c16 Dr. Werner Fink <werner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #16 from Dr. Werner Fink <werner@suse.com> 2013-04-23 16:38:19 UTC --- No update for 12.2 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=793536 https://bugzilla.novell.com/show_bug.cgi?id=793536#c Jan Engelhardt <jengelh@inai.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |VERIFIED -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=793536 https://bugzilla.novell.com/show_bug.cgi?id=793536#c17 --- Comment #17 from Swamp Workflow Management <swamp@suse.de> 2013-07-29 13:06:04 UTC --- openSUSE-RU-2013:1271-1: An update that has 7 recommended fixes can now be installed. Category: recommended (low) Bug References: 382214,763591,793536,804551,806628,820149,828877 CVE References: Sources used: openSUSE 12.2 (src): bash-4.2-51.13.1 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com