mirror of
https://github.com/Interlisp/maiko.git
synced 2026-02-01 06:12:31 +00:00
killpg is POSIX, so we can rely on it now. (#150)
This removes some usages of the SYSVONLY flag and lets us assume the existence of `killpg`. It also updates a bit of code to accurately populate the `pgrp` variable using `tcgetpgrp` rather than an ioctl.
This commit is contained in:
@@ -803,18 +803,8 @@ LispPTR Unix_handlecomm(LispPTR *args) {
|
||||
/* Change window size, then
|
||||
notify process group of the change */
|
||||
if ((ioctl(pty, TIOCSWINSZ, &w) >= 0) &&
|
||||
#ifdef ISC
|
||||
(tcgetpgrp(pty) >= 0) &&
|
||||
#else
|
||||
(ioctl(pty, TIOCGPGRP, &pgrp) >= 0) &&
|
||||
#endif /* ISC */
|
||||
|
||||
#ifdef SYSVONLY
|
||||
(kill(-pgrp, SIGWINCH) >= 0))
|
||||
#else
|
||||
((pgrp = tcgetpgrp(pty)) >= 0) &&
|
||||
(killpg(pgrp, SIGWINCH) >= 0))
|
||||
#endif /* SYSVONLY */
|
||||
|
||||
return (ATOM_T);
|
||||
return (GetSmallp(errno));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user