On Thu, 13 Jan 2022 at 20:29, Peter Maydell <peter.mayd...@linaro.org> wrote: > > On Sun, 9 Jan 2022 at 16:44, Warner Losh <i...@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