diff options
| author | Paul Eggert | 2012-10-24 21:35:39 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-10-24 21:35:39 -0700 |
| commit | 69deda53a85df68656b62acdd45662101fef58b7 (patch) | |
| tree | 7cbc1a516f7cbbc046c88e6a8ee4d34695404135 /src | |
| parent | 39ff2cf3c6cd38baf66c8c7c7ffc5b1f11a52528 (diff) | |
| download | emacs-69deda53a85df68656b62acdd45662101fef58b7.tar.gz emacs-69deda53a85df68656b62acdd45662101fef58b7.zip | |
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).
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 9 | ||||
| -rw-r--r-- | src/emacs.c | 4 | ||||
| -rw-r--r-- | src/sysdep.c | 2 | ||||
| -rw-r--r-- | src/term.c | 2 |
4 files changed, 13 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index e59a286110d..835c550b426 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2012-10-25 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Don't assume process IDs fit in int. | ||
| 4 | * emacs.c (shut_down_emacs) [!DOS_NT]: | ||
| 5 | * sysdep.c (sys_suspend) [SIGTSTP && !MSDOS]: | ||
| 6 | * term.c (dissociate_if_controlling_tty) [!DOS_NT]: | ||
| 7 | Use pid_t, not int, to store process IDs, as 'int' | ||
| 8 | is not wide enough on a few platforms (e.g., AIX and IRIX). | ||
| 9 | |||
| 1 | 2012-10-23 Kenichi Handa <handa@gnu.org> | 10 | 2012-10-23 Kenichi Handa <handa@gnu.org> |
| 2 | 11 | ||
| 3 | The following change is to make face-font-rescale-alist work | 12 | The following change is to make face-font-rescale-alist work |
diff --git a/src/emacs.c b/src/emacs.c index 0a2a60bee0c..7f3228641ae 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -1903,8 +1903,8 @@ shut_down_emacs (int sig, Lisp_Object stuff) | |||
| 1903 | /* If we are controlling the terminal, reset terminal modes. */ | 1903 | /* If we are controlling the terminal, reset terminal modes. */ |
| 1904 | #ifndef DOS_NT | 1904 | #ifndef DOS_NT |
| 1905 | { | 1905 | { |
| 1906 | int pgrp = EMACS_GETPGRP (0); | 1906 | pid_t pgrp = EMACS_GETPGRP (0); |
| 1907 | int tpgrp = tcgetpgrp (0); | 1907 | pid_t tpgrp = tcgetpgrp (0); |
| 1908 | if ((tpgrp != -1) && tpgrp == pgrp) | 1908 | if ((tpgrp != -1) && tpgrp == pgrp) |
| 1909 | { | 1909 | { |
| 1910 | reset_all_sys_modes (); | 1910 | reset_all_sys_modes (); |
diff --git a/src/sysdep.c b/src/sysdep.c index 35beeaa7202..c7174e91612 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -452,7 +452,7 @@ sys_suspend (void) | |||
| 452 | #if defined (SIGTSTP) && !defined (MSDOS) | 452 | #if defined (SIGTSTP) && !defined (MSDOS) |
| 453 | 453 | ||
| 454 | { | 454 | { |
| 455 | int pgrp = EMACS_GETPGRP (0); | 455 | pid_t pgrp = EMACS_GETPGRP (0); |
| 456 | EMACS_KILLPG (pgrp, SIGTSTP); | 456 | EMACS_KILLPG (pgrp, SIGTSTP); |
| 457 | } | 457 | } |
| 458 | 458 | ||
diff --git a/src/term.c b/src/term.c index f7c87b7608d..74b02b0af27 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -2919,7 +2919,7 @@ static void | |||
| 2919 | dissociate_if_controlling_tty (int fd) | 2919 | dissociate_if_controlling_tty (int fd) |
| 2920 | { | 2920 | { |
| 2921 | #ifndef DOS_NT | 2921 | #ifndef DOS_NT |
| 2922 | int pgid = tcgetpgrp (fd); /* If tcgetpgrp succeeds, fd is the ctty. */ | 2922 | pid_t pgid = tcgetpgrp (fd); /* If tcgetpgrp succeeds, fd is the ctty. */ |
| 2923 | if (pgid != -1) | 2923 | if (pgid != -1) |
| 2924 | { | 2924 | { |
| 2925 | #if defined (USG5) | 2925 | #if defined (USG5) |