> > Why not just kill their controlling shell?
> 
> I believe that what I'm doing...the "controlling shell" would be the
> session leader. The question is how to get its PID.

Grovel the tty structure using libkvm.

You want to look for:

(struct tty *)->t_pgrp->pg_id

Which is the process ID of the group leader of the foregroun
group.

Or you could just make revoke do its thing in the right order
instead of the wrong order, since a program with non-blocking
fds (read: any threads program) would have to be clairvoyant
(or check every time by trying to open /dev/tty, and noting when
that failed).


                                        Terry Lambert
                                        [EMAIL PROTECTED]
---
Any opinions in this posting are my own and not those of my present
or previous employers.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to