From 51f70f2040e182d8241c5b9b52dd34b66ffb44ff Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 9 Jun 2010 09:54:58 -0400 Subject: [PATCH] Use POSIX tcgetpgrp() instead of BSD TIOCGPGRP ioctl --- src/exec_pty.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/exec_pty.c b/src/exec_pty.c index 242e842c0..9728b8112 100644 --- a/src/exec_pty.c +++ b/src/exec_pty.c @@ -1149,10 +1149,8 @@ sync_ttysize(int src, int 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 }