misc/125855: sh allows for multiline, non-escaped control structures (and thus isn't POSIX compliant)

Garrett Cooper gcooper at FreeBSD.org
Tue Jul 22 07:00:11 UTC 2008


>Number:         125855
>Category:       misc
>Synopsis:       sh allows for multiline, non-escaped control structures (and thus isn't POSIX compliant)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 22 07:00:10 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Garrett Cooper
>Release:        8-CURRENT
>Organization:
n/a
>Environment:
>Description:
A while back I asked the bash guys whether or not their shell was non-POSIX compliant or FreeBSD's sh was non-POSIX compliant, due to some issues executing portsnap on OSX (it fails because of newlines in 2 sections of the file added for readability sake).

They came up with some documentation from the OpenGroup, which proves that their shell is POSIX compliant while sh isn't.

The thread originally sent to bash-bugs at gnu.org is available here:
http://groups.google.com/group/gnu.bash.bug/browse_thread/thread/c309c6a68dea8a11
and the POSIX set criterion for parsing control structures like IF is available here:
http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_03, in particular the clauses 7. and 11.

>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list