summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1998-05-25 10:37:02 +0000
committerbrian <brian@FreeBSD.org>1998-05-25 10:37:02 +0000
commitbf79f2c5a4a882aa62556198a11b4823281da1f7 (patch)
tree5541760fe2e35009dc02566f6d31a5e79d7dd198 /usr.sbin
parent11764c9d329ffe5c3ca48a7f36a64e4806dde967 (diff)
downloadFreeBSD-src-bf79f2c5a4a882aa62556198a11b4823281da1f7.zip
FreeBSD-src-bf79f2c5a4a882aa62556198a11b4823281da1f7.tar.gz
o Only do the /bin/cat bit when we're transferring our ctty.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ppp/bundle.c6
-rw-r--r--usr.sbin/ppp/modem.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/ppp/bundle.c b/usr.sbin/ppp/bundle.c
index 0bb9c7d..e06517a 100644
--- a/usr.sbin/ppp/bundle.c
+++ b/usr.sbin/ppp/bundle.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: bundle.c,v 1.6 1998/05/23 22:28:19 brian Exp $
+ * $Id: bundle.c,v 1.7 1998/05/25 02:22:30 brian Exp $
*/
#include <sys/types.h>
@@ -1450,7 +1450,7 @@ bundle_SendDatalink(struct datalink *dl, int s, struct sockaddr_un *sun)
msg.msg_iov = iov;
msg.msg_iovlen = niov;
- if (link_fd == STDIN_FILENO && isatty(link_fd)) {
+ if (tcgetpgrp(link_fd) == getpgrp()) {
/*
* We can't transfer this tty descriptor. If we do, then once the
* session leader exits, the descriptor becomes unusable by the
@@ -1480,7 +1480,7 @@ bundle_SendDatalink(struct datalink *dl, int s, struct sockaddr_un *sun)
/* We must get the ACK before closing the descriptor ! */
read(s, &ack, 1);
- if (link_fd == STDIN_FILENO && isatty(link_fd)) {
+ if (tcgetpgrp(link_fd) == getpgrp()) {
/* We use `/bin/cat' to keep the tty session id */
pid_t pid;
int status, len, fd;
diff --git a/usr.sbin/ppp/modem.c b/usr.sbin/ppp/modem.c
index 1b7f6ee..01bdab0 100644
--- a/usr.sbin/ppp/modem.c
+++ b/usr.sbin/ppp/modem.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: modem.c,v 1.83 1998/05/23 22:24:44 brian Exp $
+ * $Id: modem.c,v 1.84 1998/05/25 02:22:37 brian Exp $
*
* TODO:
*/
@@ -1051,7 +1051,7 @@ modem2iov(struct physical *p, struct iovec *iov, int *niov, int maxiov)
timer_Stop(&p->link.ccp.fsm.StoppedTimer);
if (p->Timer.state != TIMER_STOPPED) {
timer_Stop(&p->Timer);
- if (!physical_IsATTY(p) || p->fd != STDIN_FILENO)
+ if (tcgetpgrp(p->fd) == getpgrp())
p->Timer.state = TIMER_RUNNING; /* Special - see iov2modem() */
}
timer_Stop(&p->link.throughput.Timer);
OpenPOWER on IntegriCloud