diff options
| author | Eli Zaretskii | 2023-09-15 09:05:14 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2023-09-15 09:05:14 +0300 |
| commit | 160b4c295d8975755d4a8cc4ba6b6b75a549ed3c (patch) | |
| tree | 5ce8f98ba08f5c0effe12abfc26888a245f4daab /src/process.c | |
| parent | 1442f4043a761e9bdeeb4e1fbe9822c2987c1502 (diff) | |
| download | emacs-160b4c295d8975755d4a8cc4ba6b6b75a549ed3c.tar.gz emacs-160b4c295d8975755d4a8cc4ba6b6b75a549ed3c.zip | |
; * src/process.c (child_signal_notify): Avoid compiler warning (bug#65919).
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/process.c b/src/process.c index 7410256dae9..2376d0f288d 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -7415,10 +7415,14 @@ child_signal_notify (void) | |||
| 7415 | int fd = child_signal_write_fd; | 7415 | int fd = child_signal_write_fd; |
| 7416 | eassert (0 <= fd); | 7416 | eassert (0 <= fd); |
| 7417 | char dummy = 0; | 7417 | char dummy = 0; |
| 7418 | if (emacs_write (fd, &dummy, 1) != 1) | 7418 | /* We used to error out here, like this: |
| 7419 | /* This call is commented out. It calls `emacs_perror', which in | 7419 | |
| 7420 | turn invokes a localized version of strerror that is not | 7420 | if (emacs_write (fd, &dummy, 1) != 1) |
| 7421 | reentrant and must not be called within a signal handler: | 7421 | emacs_perror ("writing to child signal FD"); |
| 7422 | |||
| 7423 | But this calls `emacs_perror', which in turn invokes a localized | ||
| 7424 | version of strerror, which is not reentrant and must not be | ||
| 7425 | called within a signal handler: | ||
| 7422 | 7426 | ||
| 7423 | __lll_lock_wait_private () at /lib64/libc.so.6 | 7427 | __lll_lock_wait_private () at /lib64/libc.so.6 |
| 7424 | malloc () at /lib64/libc.so.6 | 7428 | malloc () at /lib64/libc.so.6 |
| @@ -7432,8 +7436,10 @@ child_signal_notify (void) | |||
| 7432 | deliver_process_signal (sig=17, handler=0x6186b0>) | 7436 | deliver_process_signal (sig=17, handler=0x6186b0>) |
| 7433 | <signal handler called> () at /lib64/libc.so.6 | 7437 | <signal handler called> () at /lib64/libc.so.6 |
| 7434 | _int_malloc () at /lib64/libc.so.6 | 7438 | _int_malloc () at /lib64/libc.so.6 |
| 7435 | in malloc () at /lib64/libc.so.6. */ | 7439 | in malloc () at /lib64/libc.so.6. |
| 7436 | /* emacs_perror ("writing to child signal FD") */; | 7440 | |
| 7441 | So we no longer check errors of emacs_write here. */ | ||
| 7442 | emacs_write (fd, &dummy, 1); | ||
| 7437 | #endif | 7443 | #endif |
| 7438 | } | 7444 | } |
| 7439 | 7445 | ||