diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-12-18 01:05:12 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-12-18 01:07:27 +0200 |
commit | 3c2b3777115f3e929821058f454e7a369b260898 (patch) | |
tree | ed29daadca8dc0e39e116eb07b759f04c321e45b | |
parent | 2fe7e6bef0b41129c1e443660edd7ad29b74daaa (diff) | |
download | micropython-3c2b3777115f3e929821058f454e7a369b260898.tar.gz micropython-3c2b3777115f3e929821058f454e7a369b260898.zip |
unix/unix_mphal: Just consistently set sigaction.sa_flags to 0.
-rw-r--r-- | unix/unix_mphal.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/unix/unix_mphal.c b/unix/unix_mphal.c index 523e34dd8d..dbb6fbcdd4 100644 --- a/unix/unix_mphal.c +++ b/unix/unix_mphal.c @@ -53,7 +53,7 @@ void mp_hal_set_interrupt_char(char c) { #ifndef _WIN32 // enable signal handler struct sigaction sa; - memset(&sa, 0, sizeof(sa)); + sa.sa_flags = 0; sa.sa_handler = sighandler; sigemptyset(&sa.sa_mask); sigaction(SIGINT, &sa, NULL); @@ -62,6 +62,7 @@ void mp_hal_set_interrupt_char(char c) { #ifndef _WIN32 // disable signal handler struct sigaction sa; + sa.sa_flags = 0; sa.sa_handler = SIG_DFL; sigemptyset(&sa.sa_mask); sigaction(SIGINT, &sa, NULL); |