qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 21/30] bsd-user/signal.c: force_sig


From: Peter Maydell
Subject: Re: [PATCH 21/30] bsd-user/signal.c: force_sig
Date: Thu, 13 Jan 2022 20:53:34 +0000

On Thu, 13 Jan 2022 at 20:29, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Sun, 9 Jan 2022 at 16:44, Warner Losh <imp@bsdimp.com> wrote:
> >
> > Force delivering a signal and generating a core file.

> > +/* Abort execution with signal. */
> > +void QEMU_NORETURN force_sig(int target_sig)
>
> In linux-user we call this dump_core_and_abort(), which is
> a name that better describes what it's actually doing.
>
> (Today's linux-user's force_sig() does what the Linux kernel's
> function of that name does -- it's a wrapper around
> queue_signal() which delivers a signal to the guest with
> .si_code = SI_KERNEL , si_pid = si_uid = 0.
> Whether you want one of those or not depends on what BSD
> kernels do in that kind of "we have to kill this process"
> situation.)

It looks like the FreeBSD kernel uses sigexit() as its equivalent
function to Linux's force_sig(), incidentally. Not sure if
you/we would prefer the bsd-user code to follow the naming that
FreeBSD's kernel uses or the naming linux-user takes from
the Linux kernel.

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]