From: Todd C. Miller Date: Wed, 9 Jun 2010 13:57:41 +0000 (-0400) Subject: Use POSIX tcgetpgrp() instead of BSD TIOCGPGRP ioctl X-Git-Tag: SUDO_1_7_3~96 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=72739ac212eb1ef4ff95eda1e1360baf9310cdd0;p=sudo Use POSIX tcgetpgrp() instead of BSD TIOCGPGRP ioctl --HG-- branch : 1.7 --- 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 }