qemu-e2k/include
Daniel P. Berrange 57cb38b383 osdep: add qemu_fork() wrapper for safely handling signals
When using regular fork() the child process of course inherits
all the parents' signal handlers. If the child then proceeds
to close() any open file descriptors, it may break some of those
registered signal handlers. The child generally does not want to
ever run any of the signal handlers that the parent may have
installed in the short time before it exec's. The parent may also
have blocked various signals which the child process will want
enabled.

This introduces a wrapper qemu_fork() that takes care to sanitize
signal handling across fork. Before forking it blocks all signals
in the parent thread. After fork returns, the parent unblocks the
signals and carries on as usual. The child, however, resets all the
signal handlers back to their defaults before it unblocks signals.
The child process can now exec the binary in a "clean" signal
environment.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2015-10-20 14:40:49 +01:00
..
block block: Remove bdrv_swap() 2015-10-16 15:34:30 +02:00
crypto crypto: introduce new module for handling TLS sessions 2015-09-15 15:07:43 +01:00
disas disas: Add print_insn to disassemble info 2015-07-09 15:20:40 +02:00
exec hw/pci: Introduce pci_requester_id() 2015-10-19 10:13:07 +02:00
fpu softfloat: expand out STATUS macro 2015-02-06 16:11:38 +00:00
hw hw/pci: Introduce pci_requester_id() 2015-10-19 10:13:07 +02:00
libdecnumber Fix new typos in comments (found by codespell) 2014-07-18 17:45:36 +04:00
migration migration: qemu-file more size_t'ifying 2015-09-29 11:33:02 +05:30
monitor hmp: added io apic dump state 2015-09-25 12:04:42 +02:00
net net/queue: export qemu_net_queue_append_iov 2015-10-12 13:31:18 +08:00
qapi qapi: Introduce a first class 'any' type 2015-09-21 09:56:49 +02:00
qemu osdep: add qemu_fork() wrapper for safely handling signals 2015-10-20 14:40:49 +01:00
qom exec.c: Collect AddressSpace related fields into a CPUAddressSpace struct 2015-10-12 18:29:26 +02:00
standard-headers linux-headers: update from kvm/next 2015-10-12 18:29:26 +02:00
sysemu kvm: Move x86-specific functions into target-i386/kvm.c 2015-10-19 10:13:07 +02:00
ui qemu-char: convert spice backend to data-driven creation 2015-10-19 10:13:07 +02:00
config.h janitor: move remaining public headers to include/ 2012-12-19 08:32:46 +01:00
elf.h elf: Update EM_MOXIE definition 2015-09-25 12:04:43 +02:00
glib-compat.h glib-compat: add 2.38/2.40/2.46 asserts 2015-10-19 18:28:06 -05:00
qemu-common.h util - add automated ID generation utility 2015-10-16 15:34:30 +02:00
qemu-io.h qemu-io: Use BlockBackend 2015-02-16 15:07:19 +00:00
qjson.h QJSON: Add JSON writer 2015-02-05 17:16:14 +01:00
trace-tcg.h trace: [tcg] Generate TCG tracing routines 2014-08-12 14:26:12 +01:00
trace.h trace: [tcg] Include event definitions in "trace.h" 2014-08-12 14:26:12 +01:00