1833178 Members
2930 Online
110051 Solutions
New Discussion

Re: Process not Kill

 
Jason Lim
New Member

Process not Kill

I am executing a script menu (written in korn shell) through a reflection 1 connection, but it seems that when I close the reflection 1 window (close by double click the top left corner the window) , the process of the script menu did not get kill when the reflection 1 connection is closed.

The script is residing in N-Class server running HP-UX 11.0. Any one has any idea why the script process will not get killed ? It has caused my server to have CPU bottleneck when this process goes stray since this processes consume CPU resources.

5 REPLIES 5
Printaporn_1
Esteemed Contributor

Re: Process not Kill

there is situation like parent process waiting for child exit, but child was killed before return to parent, then parent still waiting.

why donn't exit by right (exit , properly logout)
enjoy any little thing in my life
Stefan Farrelly
Honored Contributor

Re: Process not Kill


you need to use the sh-posix shell trap command to detect a signal and then exit. See man sh-posix and search for trap.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Paula J Frazer-Campbell
Honored Contributor

Re: Process not Kill

Jason

This is a very untidy way to exit by just closing a window.

Correct way is to exit the menu and/or exit from the system.

Just dropping open sessions means that the server has more work to do in trying to tidy up.

I reinforce to all my users to exit correctly before closing telnet sessions.

Paula
If you can spell SysAdmin then you is one - anon
Josh_13
Super Advisor

Re: Process not Kill

i agree with printaporn. it sounds like the parent is still waiting for the child to return. you need to use the menu exit or modify the program's code to have alternative exits alert the parent as well, then recompile the code. my personal feeling in this senario is that if it's just me i learn to exit that program right all of the time, and if others are using it, i modify the code. i do that because it's easier to modify the code than hunt down all the users and get them to exit properly.
Patrick Wallek
Honored Contributor

Re: Process not Kill

I agree with Paula. Just clicking the 'x' on the Reflection Window to exit out is a VERY BAD HABIT. I, too, always discourage the users from doing that. It doesn't take that much longer to log out correctly.