awk processes, kill & unhang users by name

awk processes, kill & unhang users by name

Post by Robert Brogd » Fri, 28 Apr 1995 04:00:00



I am trying to write a script file for normal users to be able to
kill a users processes by entering the users name.  I want a few
people in the company to be able to login under some name, go through a
simple menu, type in the users name to be killed, kill the processes
running for that user, disable and then enable the port to make sure
they can log back in.  I have gotten it to work with awk scripts, but
it sometimes goes crazy. I am not sure that awk is the best way to go,
but it is my first attempt at getting this thing to work. Any help
would be great.

Thanx
Robert

 
 
 

1. signal & kill, and how do you find the process name?

        I'm writing some stuff to `kill (SIGUSR1, pid)', the process `pid'
     has done a `signal (func, SIGUSR1)' at some stage.

        Is there any way of knowing whether that process has decided that
     it wants to detect the signal by doing a signal() call?  In other
     words, can the process doing the kill() know if the process it is
     signalling has done something with it?

        Also, the easy question I'm sure, how can you get the process name
     (that is, its argv[0]) from the pid?  Is there a system call for
     this, I can't see one from doing man apropos.

        Please email/post if you think it's of general use to others.

        Thanx in advance, Simon.
_______________________________________________________________________________
Simon Marshall, Dept. of Computer Science, University of Hull, Hull HU6 7RX, UK
              "``La la la la la la la la la'' means I love you."

2. Pentium II and slackware 3.5....which kernel mode?

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

4. printing latin1 using lpf

5. newbie q: how to let a user kill another user's process?

6. Neopaint on Linux/X ?

7. How to kill user processes and log users off??

8. LDAP Queries

9. Kill 'Old' User Process on Login of Same User

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

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

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

13. grep - getting the process name with awk (when it's over a day old)