http://bugs.grommit.com/show_bug.cgi?id=587
Summary: Need hotfix for problem with "command" builtin which
doesn't return an error when file is not readable
Product: ksh93-integration
Version: unspecified
Platform: All
OS/Version: Solaris 11/Nevada
Status: NEW
Severity: blocker
Priority: P3
Component: App/ksh93
AssignedTo: ksh93-integration-discuss at opensolaris.org
ReportedBy: roland.mainz at nrubsig.org
CC: roland.mainz at nrubsig.org, april.chin at sun.com
We need a hotfix for a problem with ast-ksh.2008-10-10's "command" builtin
which causes a command following the "command" builtin to be executed twice if
the script passed to the "command" builtin is not accessible (e.g. not
readable).
Example:
-- snip --
$ ksh93 -x -c 'print "true" >myfoo ; chmod a+x,a-r myfoo ; command ./myfoo ;
print $?'
+ print true
+ 1> myfoo
+ chmod a+x,a-r myfoo
+ command ./myfoo
ksh93[1]: ./myfoo: ./myfoo: cannot open [Permission denied]
+ print 1
1
+ print 0
0
-- snip --
The correct output should be:
-- snip --
$ ksh93 -x -c 'print "true" >myfoo ; chmod a+x,a-r myfoo ; command ./myfoo ;
print $?'
+ print true
+ 1> myfoo
+ chmod a+x,a-r myfoo
+ command ./myfoo
ksh93[1]: ./myfoo: ./myfoo: cannot open [Permission denied]
+ print 1
1
-- snip --
(as a result /usr/bin/command was not returning a non-zero exit code
for this error condition).
--
Configure bugmail: http://bugs.grommit.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.