Bug 129975 - Problem with nested use of "set -m" in pdksh.
Problem with nested use of "set -m" in pdksh.
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: pdksh (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Karsten Hopp
Depends On:
  Show dependency treegraph
Reported: 2004-08-16 01:14 EDT by Vijayeendra Namasevi
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-10-05 08:02:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Vijayeendra Namasevi 2004-08-16 01:14:35 EDT
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,

set -x
TEST_PROGRAM=./test  ## This is a test C hello world program
set -m
nohup ksh << NohupStdinEOF > vt.out 2>&1 &
echo "Testing"
set -m
#### None of the following statements execute until the set -m
echo " before exec"
exec $TEST_PROGRAM 2>&1 | tee test1.out &
echo $?
echo " after exec"
set +m
#### Statements after this do execute.
sleep 1
set +m
sleep 1
set +x

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):

How reproducible:

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, 
Actual results:
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.

Expected results:
vt.out should have "Testing" which it already has.
test1.out should have "hello world"

Additional info:
Comment 1 Karsten Hopp 2004-10-05 08:02:18 EDT
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

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