Commit 69deda53 authored by Paul Eggert's avatar Paul Eggert

Don't assume process IDs fit in int.

* emacs.c (shut_down_emacs) [!DOS_NT]:
* sysdep.c (sys_suspend) [SIGTSTP && !MSDOS]:
* term.c (dissociate_if_controlling_tty) [!DOS_NT]:
Use pid_t, not int, to store process IDs, as 'int'
is not wide enough on a few platforms (e.g., AIX and IRIX).
parent 39ff2cf3
2012-10-25 Paul Eggert <eggert@cs.ucla.edu>
Don't assume process IDs fit in int.
* emacs.c (shut_down_emacs) [!DOS_NT]:
* sysdep.c (sys_suspend) [SIGTSTP && !MSDOS]:
* term.c (dissociate_if_controlling_tty) [!DOS_NT]:
Use pid_t, not int, to store process IDs, as 'int'
is not wide enough on a few platforms (e.g., AIX and IRIX).
2012-10-23 Kenichi Handa <handa@gnu.org>
The following change is to make face-font-rescale-alist work
......
......@@ -1903,8 +1903,8 @@ shut_down_emacs (int sig, Lisp_Object stuff)
/* If we are controlling the terminal, reset terminal modes. */
#ifndef DOS_NT
{
int pgrp = EMACS_GETPGRP (0);
int tpgrp = tcgetpgrp (0);
pid_t pgrp = EMACS_GETPGRP (0);
pid_t tpgrp = tcgetpgrp (0);
if ((tpgrp != -1) && tpgrp == pgrp)
{
reset_all_sys_modes ();
......
......@@ -452,7 +452,7 @@ sys_suspend (void)
#if defined (SIGTSTP) && !defined (MSDOS)
{
int pgrp = EMACS_GETPGRP (0);
pid_t pgrp = EMACS_GETPGRP (0);
EMACS_KILLPG (pgrp, SIGTSTP);
}
......
......@@ -2919,7 +2919,7 @@ static void
dissociate_if_controlling_tty (int fd)
{
#ifndef DOS_NT
int pgid = tcgetpgrp (fd); /* If tcgetpgrp succeeds, fd is the ctty. */
pid_t pgid = tcgetpgrp (fd); /* If tcgetpgrp succeeds, fd is the ctty. */
if (pgid != -1)
{
#if defined (USG5)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment