diff options
author | brian <brian@FreeBSD.org> | 1998-05-29 18:33:10 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1998-05-29 18:33:10 +0000 |
commit | 3c804940dc0e4172a41035ca3afcfeeaa814ca6f (patch) | |
tree | 91887a8671ec07d6c0ccd49963d0db8385be68ed /usr.sbin/ppp/id.c | |
parent | c77a86dfe8218d1aa2b856b7849a682729a8b1c9 (diff) | |
download | FreeBSD-src-3c804940dc0e4172a41035ca3afcfeeaa814ca6f.zip FreeBSD-src-3c804940dc0e4172a41035ca3afcfeeaa814ca6f.tar.gz |
o If there's a session leader left running for a descriptor
that we're now closing, manually HUP that session leader
so that the tty is fully released.
o Always restart our carrier detect timer in the receiving
process if it was running in the sending process (as we
now *always* pass the descriptor).
o Tweak argv when we go into pause() mode to keep our session
so that ps can see what's going on (without checking for a
`pause' state in `ps -l').
Diffstat (limited to 'usr.sbin/ppp/id.c')
-rw-r--r-- | usr.sbin/ppp/id.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/usr.sbin/ppp/id.c b/usr.sbin/ppp/id.c index 4ac474e..406c382 100644 --- a/usr.sbin/ppp/id.c +++ b/usr.sbin/ppp/id.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: id.c,v 1.8 1998/05/21 21:45:32 brian Exp $ + * $Id: id.c,v 1.9 1998/05/28 23:15:36 brian Exp $ */ #include <sys/types.h> @@ -32,6 +32,7 @@ #include <sys/ioctl.h> #include <fcntl.h> +#include <signal.h> #include <stdarg.h> #include <stdio.h> #include <string.h> @@ -252,3 +253,15 @@ ID0connect_un(int s, const struct sockaddr_un *name) ID0setuser(); return result; } + +int +ID0kill(pid_t pid, int sig) +{ + int result; + + ID0set0(); + result = kill(pid, sig); + log_Printf(LogID0, "%d = kill(%d, %d)\n", result, (int)pid, sig); + ID0setuser(); + return result; +} |