IBM Support

IV62112: KSH BUILT-IN æEXITÆ COMMAND FAILS TO EXIT SHELL APPLIES TO AIX 7100-03

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • ksh built-in æexitÆ command fails to exit shell
    during piping output into while loop
    in which calls a function that
    opens a specified file (. file) and then
    the æexitÆ command exists in it.
    

Local fix

  • Replaces piping output as redirecting input into while
    loop
    $ cat file
    last pipe output
    $ cat exit.sh
    #!/usr/bin/ksh
    exit
    $ cat test.sh
    #!/bin/ksh
    func() {
            . ./exit.sh
            echo "executing in func"
    }
    while read line < ./file
    do
            func
            echo "executing in main"
    done
    echo "exiting from main"
    

Problem summary

  • ksh built-in exit command may fail to exit shell when
    in a script we are piping an output into while loop,
    inside the while loop a function call is made, this
    functions sources a file/script using "." operator.
    In this file/script exit command is used. When all the
    above conditions are full filled then the
    built-in exit command may fail.
    

Problem conclusion

  • Code changes are made in ksh, to ensure that built-in exit
    works properly with the pipe operator, even when exit is
    called indirectly from a source file, being sourced inside
    a function.
    

Temporary fix

Comments

  • 6100-09 - use AIX APAR IV58852
    6100-09 - use AIX APAR IV58852
    6100-09 - use AIX APAR IV58852
    7100-03 - use AIX APAR IV62112
    7100-04 - use AIX APAR IV62119
    

APAR Information

  • APAR number

    IV62112

  • Reported component name

    AIX V7.1

  • Reported component ID

    5765H4000

  • Reported release

    710

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Submitted date

    2014-06-30

  • Closed date

    2014-06-30

  • Last modified date

    2016-05-11

  • APAR is sysrouted FROM one or more of the following:

    IV58852

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    AIX V7.1

  • Fixed component ID

    5765H4000

Applicable component levels

  • R710 PSY U862084

       UP14/10/29 I 1000

PTF to Fileset Mapping

[{"Business Unit":{"code":"BU009","label":"Systems - Cognitive"},"Product":{"code":"SSMV87","label":"AIX Enterprise Edition"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"710","Edition":""},{"Business Unit":{"code":"BU011","label":"Systems - zSystems software"},"Product":{"code":"SSMVAX","label":"AIX Express Edition"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"710","Edition":""},{"Business Unit":{"code":"BU011","label":"Systems - zSystems software"},"Product":{"code":"SG11R","label":"APARs - AIX 7.1 environment"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"710","Edition":""}]

Document Information

Modified date:
11 May 2016