Andrew Cooper writes ("[PATCH v7 08/10] tools/misc: Add xen-vmtrace tool"):
> From: Michał Leszczyński <michal.leszczyn...@cert.pl>
...
> +    if ( signal(SIGINT, int_handler) == SIG_ERR )
> +        err(1, "Failed to register signal handler\n");

How bad is it if this signal handler is not effective ?

> +    if ( xc_vmtrace_disable(xch, domid, vcpu) )
> +        perror("xc_vmtrace_disable()");

I guess the tracing will remain on, pointlessly, which has a perf
impact but nothing else ?

How is it possible for the user to clean this up ?

Also: at the very least, you need to trap SIGTERM SIGHUP SIGPIPE.

It would be good to exit with the right signal by re-raising it.

> +static volatile int interrupted = 0;

sig_atomic_t

Ian.

Reply via email to