Bug 129975 - Problem with nested use of "set -m" in pdksh.
Summary: Problem with nested use of "set -m" in pdksh.
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: pdksh
Version: 3.0
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Karsten Hopp
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-08-16 05:14 UTC by Vijayeendra Namasevi
Modified: 2007-11-30 22:07 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-10-05 12:02:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Vijayeendra Namasevi 2004-08-16 05:14:35 UTC
Description of problem:
Hi,
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,



#!/bin/ksh
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.
NohupStdinEOF
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 
problem?

Thanks
Vijay


Version-Release number of selected component (if applicable):
pdksh-5.2.14-21

How reproducible:
Everytime

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 12:02:18 UTC
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
incompatibilities.


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