The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > SUN Solaris
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 05-12-2008
sparcguy sparcguy is offline
Registered User
 

Join Date: Nov 2006
Posts: 252
Quote:
Originally Posted by Santdash View Post
Hi,
Actually I am working in perl. I need to write a script when a script is running If the parent process is killed child process should be killed automatically.So I need some Information On process.

I need to know when we press ctrl+c to stop code execution where Parent is killed or child is killed.

For examle:
new.pl is running and have following details
bre30323 3267 22074 0 19:22:56 pts/2 0:00 perl new.pl

If we interrupt this process id 22074 will be killed or 3267 will be killed?

What happening is when We are interrupting a script by ctlr+c
defuncn process (speling may be incorrect) is created which runs in background and we cant kill this as it dont have pid.To remove this server needs to reboot which is not possible to do always.

If you have any way to kill defunc process that will help also.

Please help me in this issue.

Thanks In Advance
Santosh
There is a way to kill defunc process but only from solaris 9 onwards.

Do a man on preap.

The advice from sun is to use this command very cautiously and very sparingly
Reply With Quote