diff --git a/common.cpp b/common.cpp index 41318995f..c73b1bc45 100644 --- a/common.cpp +++ b/common.cpp @@ -139,7 +139,7 @@ int fgetws2(wcstring *s, FILE *f) c = getwc(f); - if (errno == EILSEQ) + if (errno == EILSEQ || errno == EINTR) { continue; } diff --git a/expand.cpp b/expand.cpp index 4c3dd9291..bca069880 100644 --- a/expand.cpp +++ b/expand.cpp @@ -512,9 +512,7 @@ bool process_iterator_t::next_process(wcstring *out_str, pid_t *out_pid) if ((cmdfile=wfopen(path + L"/cmdline", "r"))) { wcstring full_command_line; - signal_block(); fgetws2(&full_command_line, cmdfile); - signal_unblock(); /* The command line needs to be escaped */ cmd = tok_first(full_command_line.c_str());