The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to read terminal attributes using ioctl() Sreejesh.S High Level Programming 1 05-17-2008 10:56 AM
date and time to display on the terminal cesarNZ Shell Programming and Scripting 11 09-05-2007 04:19 PM
read terminal command munnu High Level Programming 6 01-11-2007 12:56 PM
How to read lock terminal values in solaris pankajarora_12 UNIX for Dummies Questions & Answers 0 07-11-2006 07:31 AM
read from terminal rein Shell Programming and Scripting 1 10-21-2005 07:43 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-29-2001
Registered User
 

Join Date: Nov 2001
Posts: 4
Question Terminal Hungup at the time of read

Hi,

There are two scripts. The second script is called from the first one. These will create two processes on unix. In the second script, there is a read statement in the while loop.

Under unexpected conditions, at the time of reading response from the user, if the terminal hungup happens, the subprocess is still running because of the loop. I need to stop the
subprocess if the terminal hungup happens.
I tried using trap , but it didn't work.
Any help will be greatly appreciated ? Looking for quick response.

Thanks,
kk.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 11-30-2001
Registered User
 

Join Date: Nov 2001
Posts: 35
[my lamer solution] in the second script, test in the loop whether ps list inclide Parent PID -

$PPID in the korn shell

$$ in the csh
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 02:24 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0