fix segmentation fault issue caused by uninitialized sa_flags in signal.c