UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 6th, 2005, 01:19 AM
superprogrammer superprogrammer is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Nov 2003
Posts: 754 superprogrammer User rank is Lance Corporal (50 - 100 Reputation Level)superprogrammer User rank is Lance Corporal (50 - 100 Reputation Level)superprogrammer User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 6 Days 8 h 59 m 25 sec
Reputation Power: 5
Send a message via AIM to superprogrammer Send a message via MSN to superprogrammer Send a message via Yahoo to superprogrammer
Trap command problem

I am having a unix script which in turns calls another unix script.
Both are creating some temp files in /tmp which are supposed to be deleted after the end of each run

In the child script if I have statement like

trap "rm -f $messagefile" EXIT

A similar statement is there in parent script.


In case of error, although the trap command in child script is working fine but the trap command in parent script is not working.

Is there anyway through which I can return some signal/error exit code from child script’s trap statement so that parent works.
__________________
Contact info:
Primary email: advanced.programmer@gmail.com
MSN/email: superprg@hotmail.com
AIM: superprg

Reply With Quote
  #2  
Old June 6th, 2005, 01:51 AM
superprogrammer superprogrammer is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Nov 2003
Posts: 754 superprogrammer User rank is Lance Corporal (50 - 100 Reputation Level)superprogrammer User rank is Lance Corporal (50 - 100 Reputation Level)superprogrammer User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 6 Days 8 h 59 m 25 sec
Reputation Power: 5
Send a message via AIM to superprogrammer Send a message via MSN to superprogrammer Send a message via Yahoo to superprogrammer
Forgot to mention
The interface runs through a java code which is called by this child script. Now in java application we get a timeout exception sometimes and the programme terminates without deleting the temp files created by parent script. But all temp files created from the child script are deleted...

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > Trap command problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway