[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: Eli Zaretskii
Subject: Re: EMACS_GET_TTY_PGRP vs. emacs_get_tty_pgrp
Date: Wed, 20 Oct 2010 22:21:12 +0200

> Date: Wed, 20 Oct 2010 16:01:42 -0400
> From: Ken Brown <address@hidden>
> Cc: emacs-devel <address@hidden>
> But then I still think emacs_get_tty_pgrp in process.c should be changed 
> so that it works on systems that have tcgetpgrp but not TIOCGPGRP.  How 
> would you recommend handling this?  Is it necessary to use conditional 
> code as in the emacs-23 definition of EMACS_GET_TTY_PGRP, or is it safe 
> to just always use tcgetpgrp as in the trunk's version of 

I would suggest to use TIOCGPGRP (inside emacs_get_tty_pgrp) if it's
available, because at least on some systems it allows to access file
descriptors of processes other than the current one, while tcgetpgrp
does not.

Please note that emacs_get_tty_pgrp is used elsewhere in process.c,
and also make sure that it does what it does today on systems (w32)
which have neither TIOCGPGRP nor tcgetpgrp.

reply via email to

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