HELP!! How to Kill this process!!

HELP!! How to Kill this process!!

Post by K.M. T » Sat, 26 Jun 1993 20:09:50



I have problem in killing the process. Yesterday while I was doing
something, the system went down. I was using a PC with a Kermit
emulator. So I just switch off the PC. As the system is up again, I
login and find that I have a process but when I type ps -x, I couldn't
find it. Below is the screen capture of using "w csn88" which I find
that I have a process (ttypc)and "ps -x" which I can't find one. Could
anybody please tell me what is going on. Please help!!! Thanks in advance.

Script started on Fri Jun 25 11:57:27 1993
bilbo% w csn88
 11:57am  up 14 days,  3:23,  12 users,  load average: 2.38, 2.17, 1.85

csn88    ttyp0    11:52am            2         script
csn88    ttyp9    11:57am                      w csn88
csn88    ttypc    Thu 4pm 18:46                -
bilbo% ps -x
  PID TT STAT  TIME COMMAND
18971 p0 I     0:00 -csh (csh)
19049 p0 S     0:00 script
19050 p0 S     0:00 script
19051 p9 S     0:00 -h -i (csh)
19062 p9 R     0:00 ps -x
bilbo% exit
bilbo%
script done on Fri Jun 25 11:58:05 1993
--
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
*K.M.TAY                                      * TIME WAITS FOR NO MAN!!!!!!  *
*                                             *                              *

 
 
 

HELP!! How to Kill this process!!

Post by Rob Ry » Sat, 26 Jun 1993 20:50:35



>I have problem in killing the process. Yesterday while I was doing
>something, the system went down. I was using a PC with a Kermit
>emulator. So I just switch off the PC. As the system is up again, I
>login and find that I have a process but when I type ps -x, I couldn't
>find it. Below is the screen capture of using "w csn88" which I find
>that I have a process (ttypc)and "ps -x" which I can't find one. Could
>anybody please tell me what is going on. Please help!!! Thanks in advance.

>Script started on Fri Jun 25 11:57:27 1993
>bilbo% w csn88
> 11:57am  up 14 days,  3:23,  12 users,  load average: 2.38, 2.17, 1.85

>csn88    ttyp0    11:52am            2         script
>csn88    ttyp9    11:57am                      w csn88
>csn88    ttypc    Thu 4pm 18:46                -
>bilbo% ps -x
>  PID TT STAT  TIME COMMAND
>18971 p0 I     0:00 -csh (csh)
>19049 p0 S     0:00 script
>19050 p0 S     0:00 script
>19051 p9 S     0:00 -h -i (csh)
>19062 p9 R     0:00 ps -x
>bilbo% exit
>bilbo%

The problem isn't that you have a process still running, but rather
that the entry in your /etc/utmp wasn't updated (i.e. the associated
process is gone, but /etc/utmp doesn't know this).  This used to
happen a lot to me under SunOS 4.1.3, but when another process is
created that uses that pseudo terminal (in your case ttypc), then the
previous entry is cleaned up in /etc/utmp.

Hope this helps.
--
Rob Ryan, System Constructs Inc.


 
 
 

1. How can kill all child processes without killing parent process ?

: Hi all UNIX expert,

: I am now writing a shell script to kill all child processes of a
: particular process.  I have written the following
: script:

: ps -ef | grep o\\ra  | awk '{print $2}' | xargs kill

: where ora is the name of the parent process

: However, this shell script only kills out the parent process,
: Does anyone know how to kill all child process without
: killing that parent process ? Please advise !!! Many thanks !!!
: Have a nice UNIX day !!!

you will have to read all matching processes and only kill the last in the
chain by using PID and PPID; unfortunately we can not assume that the
child is the process with the highest PPID:
assume $2=PID , $3=PPID ( coming from   ps -ef | grep o\\ra  | grep -v grep )

{
        PID[ $2 ]=""
        PPID[ $3 ]=""

END{
# process ids which are also parents should be deleted
        for( pid in PPID ) if ( pid in PID ) delete PID[ pid ]
        for( pid in PID ) { do_whatever_you_like_on_your_own_risk( pid ) }
        }

function do_whatever_you_like_on_your_own_risk( param ){
        code...
        }

2. Open Job Announcement; Lab Coordinator

3. A method to kill process that cannot be killed even with `kill -9'.

4. KDE 3 and kmid embedding

5. How to kill process which not killed by 'kill' ?

6. Digi board

7. Help: kill sub-process after parent killed

8. Intermittent shmat failure in 4.3.2, SMP

9. How to Kill Process and Its sub-process and its sub-process??

10. How to Kill a process and its sub-process and its sub-process at a time..

11. Help! bash annoyingly kills background processes when xterm is closed

12. killing dead process, kill -9 doesn′t work

13. how to kill a process when kill -9 won't