[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | DIGITAL UNIX (FORMERLY KNOWN AS DEC OSF/1) |
Notice: | Welcome to the Digital UNIX Conference |
Moderator: | SMURF::DENHAM |
|
Created: | Thu Mar 16 1995 |
Last Modified: | Fri Jun 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 10068 |
Total number of notes: | 35879 |
Hi,
a customer complains that Digital UNIX ksh behaves
different than SunOS/Solaris.
Specific to a STOP Signal to a parent process.
Here is a example to reproduce:
------------------------
# more *.sh
::::::::::::::
s1.sh
::::::::::::::
#!/bin/sh
echo "\nScript1 started"
sh -x ./s2.sh
echo "Script1 ended\n"
::::::::::::::
s2.sh
::::::::::::::
#!/bin/sh
echo "\tScript2 started"
# Activate CONT process
sh -x ./s3.sh &
sleep 5
# Activate STOP process
sh -x ./s4.sh
echo "\tScript2 ended"
::::::::::::::
s3.sh
::::::::::::::
#!/bin/sh
echo "\t\tRelease process waiting"
sleep 15
echo "\t\t\tActivated release process"
/usr/bin/kill -CONT `ps -o ppid="" -p $$`
::::::::::::::
s4.sh
::::::::::::::
#!/bin/sh
echo "\t\t\tActivate STOP process"
# Stop Parent Process
/usr/bin/kill -STOP `ps -o ppid="" -p $$`
#
# s1.sh
Script1 started
+ echo \tScript2 started
Script2 started
+ sleep 5
+ sh -x ./s3.sh
+ echo \t\tRelease process waiting
Release process waiting
+ sleep 15
+ sh -x ./s4.sh
+ echo \t\t\tActivate STOP process
Activate STOP process
+ ps -o ppid= -p 19944
+ /usr/bin/kill -STOP 19957
+ echo \t\t\tActivated release process
Activated release process
+ ps -o ppid= -p 19965
+ /usr/bin/kill -CONT 19957
+ echo \tScript2 ended
Script2 ended
Script1 ended
#
# setenv BIN_SH xpg4
#s1.sh
Script1 started
+ echo \tScript2 started
Script2 started
+ sh -x ./s3.sh
+ sleep 5
+ echo \t\tRelease process waiting
Release process waiting
+ sleep 15
+ sh -x ./s4.sh
+ echo \t\t\tActivate STOP process
Activate STOP process
+ ps -o ppid= -p 19966
+ /usr/bin/kill -STOP 19949
Script1 ended
---------------------------
So with sh it looks OK, and with ksh all script processes are
killed.
Which of the ksh's (DEC / SUN) hehaves correctly.
Tested with Digital UNIX V3.2D, V4.0A
Regards Joe
[Posted by WWW Notes gateway]
T.R | Title | User | Personal Name | Date | Lines
|
---|