#ifndef __UM_UBD_USER_H
 #define __UM_UBD_USER_H
 
-extern void ignore_sigwinch_sig(void);
 extern int start_io_thread(unsigned long sp, int *fds_out);
 extern int io_thread(void *arg);
 extern int kernel_fd;
 
        struct io_thread_req *req;
        int n;
 
-       ignore_sigwinch_sig();
+       os_fix_helper_signals();
+
        while(1){
                n = os_read_file(kernel_fd, &req,
                                 sizeof(struct io_thread_req *));
 
 #include "ubd.h"
 #include <os.h>
 
-void ignore_sigwinch_sig(void)
-{
-       signal(SIGWINCH, SIG_IGN);
-}
-
 int start_io_thread(unsigned long sp, int *fd_out)
 {
        int pid, fds[2], err;
 
 extern void setup_hostinfo(char *buf, int len);
 extern void os_dump_core(void) __attribute__ ((noreturn));
 extern void um_early_printk(const char *s, unsigned int n);
+extern void os_fix_helper_signals(void);
 
 /* time.c */
 extern void idle_sleep(unsigned long long nsecs);
 
        struct io_event event;
        int err, n, reply_fd;
 
-       signal(SIGWINCH, SIG_IGN);
-
+       os_fix_helper_signals();
        while (1) {
                n = io_getevents(ctx, 1, 1, &event, NULL);
                if (n < 0) {
        struct aio_thread_reply reply;
        int err;
 
-       signal(SIGWINCH, SIG_IGN);
+       os_fix_helper_signals();
        while (1) {
                err = read(aio_req_fd_r, &req, sizeof(req));
                if (err != sizeof(req)) {
 
        signal(SIGHUP, SIG_IGN);
        set_handler(SIGIO);
        signal(SIGWINCH, SIG_IGN);
-       signal(SIGTERM, SIG_DFL);
 }
 
        int i, n, respond_fd;
        char c;
 
-       signal(SIGWINCH, SIG_IGN);
+       os_fix_helper_signals();
        fds = ¤t_poll;
        while (1) {
                n = poll(fds->poll, fds->used, -1);
 
                        exit(127);
 }
 
+/*
+ * UML helper threads must not handle SIGWINCH/INT/TERM
+ */
+void os_fix_helper_signals(void)
+{
+       signal(SIGWINCH, SIG_IGN);
+       signal(SIGINT, SIG_DFL);
+       signal(SIGTERM, SIG_DFL);
+}
+
 void os_dump_core(void)
 {
        int pid;