[Bug 217159] ps default to 79 characters can break ps|grep in shell scripts

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Feb 17 07:37:29 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=217159

            Bug ID: 217159
           Summary: ps default to 79 characters can break ps|grep in shell
                    scripts
           Product: Base System
           Version: 11.0-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: n.deepak at gmail.com

Created attachment 180064
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=180064&action=edit
Patch to set unlimited terminal size if we can't determine terminal
characteristics

FreeBSD ps defaults to output width of 79 characters if it cannot determine tty
width.  This can hurt scripts that use "ps | grep" and run, for example, ssh on
a non-interactive shell.

I've provided more context here:

http://deepix.github.io/2016/10/10/psww.html

I've also provided a patch as an attachment in unified diff format.

Note that this problem does not exist on Linux or OS X.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list