On 10/20/2010 11:14 AM, Andreas Schwab wrote: > Ken Brown writes: > >> The macro EMACS_GET_TTY_PGRP defined in src/systty.h uses either >> tcgetpgrp or TIOCGPGRP to get the PGID of a terminal's foreground >> process group. But src/process.c defines and uses its own >> emacs_get_tty_pgrp that only works on systems that have TIOCGPGRP. Is >> there a good reason for this? > > Is "historical accident" a good reason? :-) Sure. It turned out that emacs_get_tty_pgrp has different arguments than its uppercase cousin, so I didn't get rid of it. But I used the macro inside the function instead and got rid of all ifdefs involving TIOCGPGRP. Does the attached patch look OK? Ken