[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EMACS_GET_TTY_PGRP vs. emacs_get_tty_pgrp

From: Dan Nicolaescu
Subject: Re: EMACS_GET_TTY_PGRP vs. emacs_get_tty_pgrp
Date: Wed, 20 Oct 2010 14:59:12 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Ken Brown <address@hidden> 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

It does not:

#ifndef DOS_NT
#define EMACS_GET_TTY_PGRP(fd, pgid) (*(pgid) = tcgetpgrp ((fd)))
#define EMACS_SET_TTY_PGRP(fd, pgid) (tcsetpgrp ((fd), *(pgid)))
#endif /* not DOS_NT */

also, I have a patch to remove this, it's only used in two places, so
it's not very useful as an abstraction.

> 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?  If not, I would like to try to prepare
> a patch to change process.c to use the macro instead.  This would
> simplify the code and would also extend some of the functionality in
> process.c to systems that have tcgetpgrp but not TIOCGPGRP.
> Ken

reply via email to

[Prev in Thread] Current Thread [Next in Thread]