Red Hat Bugzilla – Bug 129975
Problem with nested use of "set -m" in pdksh.
Last modified: 2007-11-30 17:07:03 EST
Description of problem:
In one of our scripts, we use the "set -m" to monitor background
processes in a nested fashion. With pdksh, after the second "set -m"
none of the statements get executed. Following toned down script
demostrates the problem,
TEST_PROGRAM=./test ## This is a test C hello world program
nohup ksh << NohupStdinEOF > vt.out 2>&1 &
#### None of the following statements execute until the set -m
echo " before exec"
exec $TEST_PROGRAM 2>&1 | tee test1.out &
echo " after exec"
#### Statements after this do execute.
The PDKSH level on my machine is, pdksh-5.2.14-21
Kernel level is -> kernel-2.4.21-9.EL
We downloaded ksh93 from the kornshell.com site and the above
script works perfectly fine.
Has anyone seen a similar issue? Any suggestions to get around this
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.Write a simple hello world C program and name it test.c.
2.Build the test program into an executable (test) and place in the
same directory as the script.
3.Now run the script. Check the output files,
Two output files are to be generated. vt.out and test1.out (along
side anything that comes on the stderr. The output is redirected to
those files and stderr). vt.out has "Testing" which is expected, but
test1.out has nothing in it, which is the problem.
vt.out should have "Testing" which it already has.
test1.out should have "hello world"
Please use the AT&T ksh package from our RHN Extras Channel if you need
a 'real' ksh. pdksh doesn't have nearly as much features as the
original ksh and probably never will have. It is known to have some