o Only do the /bin/cat bit when we're transferring our ctty.
This commit is contained in:
parent
0d8dc09755
commit
d3200eba0c
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user