Bug 510833 - ksh $? not set correctly
Summary: ksh $? not set correctly
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ksh
Version: 11
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Michal Hlavinka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 516996
TreeView+ depends on / blocked
 
Reported: 2009-07-11 08:04 UTC by André Mostert
Modified: 2009-08-17 21:57 UTC (History)
2 users (show)

Fixed In Version: 20081212-1.fc11
Clone Of:
Environment:
Last Closed: 2009-08-17 21:57:11 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description André Mostert 2009-07-11 08:04:26 UTC
Description of problem:
ksh $? not set correctly

Version-Release number of selected component (if applicable):
$ /bin/ksh --version
  version         sh (AT&T Research) 93t 2008-11-04

How reproducible:
Always

Steps to Reproduce:
$ cat ksh-test
#!/bin/ksh

findprocesspid()
{
    pid="`cat /dev/null`"

    if [ "${pid}" = "" ]; then
        false
    else
        echo "${pid}"
        true
    fi
}

findprocesspid
echo $?

pid=`findprocesspid `
echo $? $pid  

Actual results:
$ /bin/ksh ksh-test
1
0

Expected results:
$ /mnt/ubuntu/bin/ksh93 --version
  version         sh (AT&T Research) 93s+ 2008-01-31
$ /mnt/ubuntu/bin/ksh93 ksh-test
1
1


Additional info:
Official build of ksh version 93t works as expected.

Comment 1 Michal Hlavinka 2009-07-13 06:55:14 UTC
thanks, confirmed. Version 2008-11-04 is broken, 2008-12-12 works.

Comment 2 Fedora Update System 2009-07-29 07:58:18 UTC
ksh-20081212-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/ksh-20081212-1.fc11

Comment 3 Fedora Update System 2009-07-29 21:31:17 UTC
ksh-20081212-1.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update ksh'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-8094

Comment 4 Fedora Update System 2009-08-17 21:57:06 UTC
ksh-20081212-1.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.