Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern for logsoftc.sc_pgid, use negative value for proces...
details: https://anonhg.NetBSD.org/src/rev/df84d3981c5c
branches: trunk
changeset: 551488:df84d3981c5c
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Sun Sep 07 09:30:20 2003 +0000
description:
for logsoftc.sc_pgid, use negative value for process group and positive
for process ID, to match e.g. how socket code sets things up
diffstat:
sys/kern/subr_log.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diffs (47 lines):
diff -r ee831bf9f2e6 -r df84d3981c5c sys/kern/subr_log.c
--- a/sys/kern/subr_log.c Sun Sep 07 09:07:19 2003 +0000
+++ b/sys/kern/subr_log.c Sun Sep 07 09:30:20 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_log.c,v 1.29 2003/08/07 16:31:53 agc Exp $ */
+/* $NetBSD: subr_log.c,v 1.30 2003/09/07 09:30:20 jdolecek Exp $ */
/*
* Copyright (c) 1982, 1986, 1993
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_log.c,v 1.29 2003/08/07 16:31:53 agc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_log.c,v 1.30 2003/09/07 09:30:20 jdolecek Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -283,10 +283,10 @@
return;
selnotify(&logsoftc.sc_selp, 0);
if (logsoftc.sc_state & LOG_ASYNC) {
- if (logsoftc.sc_pgid > 0)
- gsignal(logsoftc.sc_pgid, SIGIO);
- else if (logsoftc.sc_pgid < 0 &&
- (p = pfind(-logsoftc.sc_pgid)) != NULL)
+ if (logsoftc.sc_pgid < 0)
+ gsignal(-logsoftc.sc_pgid, SIGIO);
+ else if (logsoftc.sc_pgid > 0 &&
+ (p = pfind(logsoftc.sc_pgid)) != NULL)
psignal(p, SIGIO);
}
if (logsoftc.sc_state & LOG_RDWAIT) {
@@ -338,11 +338,11 @@
if (error)
return error;
}
- logsoftc.sc_pgid = pgid;
+ logsoftc.sc_pgid = -pgid;
break;
case TIOCGPGRP:
- *(int *)data = logsoftc.sc_pgid;
+ *(int *)data = -logsoftc.sc_pgid;
break;
default:
Home |
Main Index |
Thread Index |
Old Index