GNU bug report logs -
#56239
28.1; Cannot send signals by name to inferior process by calling signal-process interactively
Previous Next
Reported by: Daniel Martín <mardani29 <at> yahoo.es>
Date: Sun, 26 Jun 2022 20:16:01 UTC
Severity: normal
Found in version 28.1
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 56239 in the body.
You can then email your comments to 56239 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#56239
; Package
emacs
.
(Sun, 26 Jun 2022 20:16:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Daniel Martín <mardani29 <at> yahoo.es>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 26 Jun 2022 20:16:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
The scenario is a user that wants to send the signal SIGUSR1 (for
example) to an inferior process and does the following:
Switch to the buffer associated with the inferior process.
M-x signal-process RET
Press RET for the process (so that the process associated with the
current buffer is used).
For the signal code, type 'SIGUSR1 (or "SIGUSR1", or SIGUSR1).
The operation fails with the message "Please enter a number".
The docstring of signal-process says that sending a signal by name
should be possible:
"SIGCODE may be an integer, or a symbol whose name is a signal name."
If we call the command non-interactively, it works correctly:
M-: (signal-process nil 'SIGUSR1)
In GNU Emacs 28.1 (build 1, aarch64-apple-darwin21.1.0, NS appkit-2113.00 Version 12.0.1 (Build 21A559))
of 2022-04-04 built on armbob.lan
Windowing system distributor 'Apple', version 10.3.2113
System Description: macOS 12.4
Configured using:
'configure --with-ns '--enable-locallisppath=/Library/Application
Support/Emacs/${version}/site-lisp:/Library/Application
Support/Emacs/site-lisp' --with-modules'
Configured features:
ACL GMP GNUTLS JSON LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER THREADS
TOOLKIT_SCROLL_BARS ZLIB
Important settings:
value of $LANG: en_ES.UTF-8
locale-coding-system: utf-8-unix
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#56239
; Package
emacs
.
(Sun, 26 Jun 2022 20:48:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 56239 <at> debbugs.gnu.org (full text, mbox):
Daniel Martín via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs <at> gnu.org> writes:
> For the signal code, type 'SIGUSR1 (or "SIGUSR1", or SIGUSR1).
>
> The operation fails with the message "Please enter a number".
Yup. I've now fixed this in Emacs 29. I wasn't sure whether to allow
completing to USR1 og SIGUSR1, and went with the former, but I don't
really have an opinion on what form to use. (So feel free to change
that.)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
bug marked as fixed in version 29.1, send any further explanations to
56239 <at> debbugs.gnu.org and Daniel Martín <mardani29 <at> yahoo.es>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sun, 26 Jun 2022 20:48:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#56239
; Package
emacs
.
(Mon, 27 Jun 2022 10:30:03 GMT)
Full text and
rfc822 format available.
Message #13 received at 56239 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
Hi Lars,
>> For the signal code, type 'SIGUSR1 (or "SIGUSR1", or SIGUSR1).
>>
>> The operation fails with the message "Please enter a number".
>
> Yup. I've now fixed this in Emacs 29. I wasn't sure whether to allow
> completing to USR1 og SIGUSR1, and went with the former, but I don't
> really have an opinion on what form to use. (So feel free to change
> that.)
Unfortunately, it's not such simple. signal-process can also deliver a
signal to a process running on a remote host. The signal names on that
host might differ from the signal names on the local host, collected by
Fsignal_names.
How do we want to handle this? I don't see a simple solution, because
the file name handler machinery is not in use here.
Best regards, Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#56239
; Package
emacs
.
(Mon, 27 Jun 2022 10:42:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 56239 <at> debbugs.gnu.org (full text, mbox):
Michael Albinus <michael.albinus <at> gmx.de> writes:
> Unfortunately, it's not such simple. signal-process can also deliver a
> signal to a process running on a remote host. The signal names on that
> host might differ from the signal names on the local host, collected by
> Fsignal_names.
>
> How do we want to handle this? I don't see a simple solution, because
> the file name handler machinery is not in use here.
I think users will just have to use numbers in those cases (which is
still possible). I.e., the symbol names are a convenience where it
works, but if not, then users can't use those.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#56239
; Package
emacs
.
(Mon, 27 Jun 2022 11:26:01 GMT)
Full text and
rfc822 format available.
Message #19 received at 56239 <at> debbugs.gnu.org (full text, mbox):
> Cc: 56239 <at> debbugs.gnu.org, Daniel Martín <mardani29 <at> yahoo.es>
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Date: Mon, 27 Jun 2022 12:41:29 +0200
>
> Michael Albinus <michael.albinus <at> gmx.de> writes:
>
> > Unfortunately, it's not such simple. signal-process can also deliver a
> > signal to a process running on a remote host. The signal names on that
> > host might differ from the signal names on the local host, collected by
> > Fsignal_names.
> >
> > How do we want to handle this? I don't see a simple solution, because
> > the file name handler machinery is not in use here.
>
> I think users will just have to use numbers in those cases (which is
> still possible). I.e., the symbol names are a convenience where it
> works, but if not, then users can't use those.
I agree, but there's a larger problem here: signal numbers that
correspond to given names are also system-dependent. That is, SIGINT
could be 2 on one system and 295 on another. So if you type
M-x signal-process RET INT RET
you could send to the process a signal number that will be interpreted
on the remote host as some completely different signal.
So I think we should at least document that symbolic names should be
used for remote processes only very carefully, if at all.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#56239
; Package
emacs
.
(Mon, 27 Jun 2022 11:51:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 56239 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
Hi,
>> > Unfortunately, it's not such simple. signal-process can also deliver a
>> > signal to a process running on a remote host. The signal names on that
>> > host might differ from the signal names on the local host, collected by
>> > Fsignal_names.
>> >
>> > How do we want to handle this? I don't see a simple solution, because
>> > the file name handler machinery is not in use here.
>>
>> I think users will just have to use numbers in those cases (which is
>> still possible). I.e., the symbol names are a convenience where it
>> works, but if not, then users can't use those.
>
> I agree, but there's a larger problem here: signal numbers that
> correspond to given names are also system-dependent. That is, SIGINT
> could be 2 on one system and 295 on another. So if you type
>
> M-x signal-process RET INT RET
>
> you could send to the process a signal number that will be interpreted
> on the remote host as some completely different signal.
>
> So I think we should at least document that symbolic names should be
> used for remote processes only very carefully, if at all.
I don't mean to refrain from signal names. We have them already - Tramp
determines those names on the remote host when
process-file-return-signal-string is non-nil. The signal names are
returned when process-file returns with a retcode greater or equal 128.
I like to use this existing mechanism also with signal-process. The
point is that signal-process (and interrupt-process) don't use the file
name handler mechanism, but an own implementation based on variables
signal-process-functions and interrupt-process-functions. This I would
like to move to the default file name handler implementation, which
would include a solution for signal names.
Best regards, Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#56239
; Package
emacs
.
(Wed, 29 Jun 2022 13:36:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 56239 <at> debbugs.gnu.org (full text, mbox):
Michael Albinus <michael.albinus <at> gmx.de> writes:
> Hi,
>>> > Unfortunately, it's not such simple. signal-process can also deliver a
>>> > signal to a process running on a remote host. The signal names on that
>>> > host might differ from the signal names on the local host, collected by
>>> > Fsignal_names.
>>> >
>>> > How do we want to handle this? I don't see a simple solution, because
>>> > the file name handler machinery is not in use here.
>>>
>>> I think users will just have to use numbers in those cases (which is
>>> still possible). I.e., the symbol names are a convenience where it
>>> works, but if not, then users can't use those.
>>
>> I agree, but there's a larger problem here: signal numbers that
>> correspond to given names are also system-dependent. That is, SIGINT
>> could be 2 on one system and 295 on another. So if you type
>>
>> M-x signal-process RET INT RET
>>
>> you could send to the process a signal number that will be interpreted
>> on the remote host as some completely different signal.
>>
>> So I think we should at least document that symbolic names should be
>> used for remote processes only very carefully, if at all.
>
> I don't mean to refrain from signal names. We have them already - Tramp
> determines those names on the remote host when
> process-file-return-signal-string is non-nil. The signal names are
> returned when process-file returns with a retcode greater or equal 128.
I've checked again - we don't send signals to remote hosts
interactively. This would be posible only if the REMOTE argument of
signal-process is non-nil. This doesn't happen interactively. Nothing to
do ATM, therefore.
> I like to use this existing mechanism also with signal-process. The
> point is that signal-process (and interrupt-process) don't use the file
> name handler mechanism, but an own implementation based on variables
> signal-process-functions and interrupt-process-functions. This I would
> like to move to the default file name handler implementation, which
> would include a solution for signal names.
This is a different topic, so we shouldn't discuss it here.
Best regards, Michael.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 28 Jul 2022 11:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 326 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.