[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SIGTRAP in kill emulation on Windows
From: |
Eli Zaretskii |
Subject: |
Re: SIGTRAP in kill emulation on Windows |
Date: |
Fri, 26 Aug 2016 12:13:07 +0300 |
> From: Alain Schneble <address@hidden>
> CC: <address@hidden>
> Date: Fri, 26 Aug 2016 10:58:58 +0200
>
> Eli Zaretskii <address@hidden> writes:
>
> >> Sending SIGTRAP to a process -- whether it's an unrelated, child or the
> >> calling Emacs process itself -- does not seem to have any effect as long
> >> as no debugger is attached to the receiving process.
> >
> > Do you see the same with the debugbreak program you've built earlier?
> > If not, then that program does something that your patch doesn't.
>
> Yes, debugbreak and the proposed implementation behave identically.
Then I guess that's a limitation we will have to live with. It
doesn't sound like a grave one to me: after all, what exactly SIGTRAP
does when no debugger is attached is not very important, since that is
not the primary use case for that signal, AFAIU. If a Lisp program
wants to kill the process, it doesn't need to use SIGTRAP.
> >> But with all processes I tried, none of them was ever terminated.
> >
> > That's a pity; on GNU/Linux the target program does terminate. If
> > there's nothing that can be done, we will just have to document this
> > quirk, at least for many/most programs Emacs users will meet on their
> > systems.
>
> Yes, and on GNU/Linux I observed that it prints a backtrace prior to
> termination.
That depends on ulimit and suchlikes, I think: on a GNU/Linux system I
tried that, the program was simply dumped to the shell prompt without
printing anything.
> But that's kind of irrelevant here I guess. Where would be the best
> place to document this quirk (c, signal-process, info manual)?
In the Info manual, I think.
> FWIW, there is probably something we could do about it -- query if the
> process in question is attached to a debugger. If not, we could
> terminate it.
That's for the application to decide, IMO. Signal delivery is too
low-level to replace one signal with another one.
- SIGTRAP in kill emulation on Windows, Alain Schneble, 2016/08/25
- Re: SIGTRAP in kill emulation on Windows, Eli Zaretskii, 2016/08/25
- Re: SIGTRAP in kill emulation on Windows, Alain Schneble, 2016/08/25
- Re: SIGTRAP in kill emulation on Windows, Alain Schneble, 2016/08/25
- Re: SIGTRAP in kill emulation on Windows, Eli Zaretskii, 2016/08/26
- Re: SIGTRAP in kill emulation on Windows, Alain Schneble, 2016/08/26
- Re: SIGTRAP in kill emulation on Windows,
Eli Zaretskii <=
- Re: SIGTRAP in kill emulation on Windows, Eli Zaretskii, 2016/08/26
- Re: SIGTRAP in kill emulation on Windows, Alain Schneble, 2016/08/26
- Re: SIGTRAP in kill emulation on Windows, Alain Schneble, 2016/08/26