From 72739ac212eb1ef4ff95eda1e1360baf9310cdd0 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 9 Jun 2010 09:57:41 -0400 Subject: [PATCH] Use POSIX tcgetpgrp() instead of BSD TIOCGPGRP ioctl --HG-- branch : 1.7 --- exec_pty.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/exec_pty.c b/exec_pty.c index 7c2940fda..12ae533a1 100644 --- a/exec_pty.c +++ b/exec_pty.c @@ -1039,10 +1039,8 @@ sync_ttysize(src, dst) if (ioctl(src, TIOCGSIZE, &tsize) == 0) { ioctl(dst, TIOCSSIZE, &tsize); -#ifdef TIOCGPGRP - if (ioctl(dst, TIOCGPGRP, &pgrp) == 0) - killpg(pgrp, SIGWINCH); -#endif + if ((pgrp = tcgetpgrp(dst)) != -1) + killpg(pgrp, SIGWINCH); } #endif } -- 2.40.0