commit 2b409042b17a5f12c9138df589881e336798f862 from: Omar Polo date: Wed Sep 15 14:12:02 2021 UTC ignore the crashed file if in safe_mode During safe_mode the fs process shouldn't open or unlink the crashed_file. commit - 55ccd6d096be150da4ea2ad1d4aa6bd60059fb0f commit + 2b409042b17a5f12c9138df589881e336798f862 blob - f2c755588ed794e744644bee143216ebc661df94 blob + fdecab115c609ede4704065525fab176c8de6af2 --- fs.c +++ fs.c @@ -316,7 +316,8 @@ handle_get_file(struct imsg *imsg, size_t datalen) static void handle_quit(struct imsg *imsg, size_t datalen) { - unlink(crashed_file); + if (!safe_mode) + unlink(crashed_file); event_loopbreak(); } @@ -605,6 +606,9 @@ last_time_crashed(void) { int fd, crashed = 1; + if (safe_mode) + return 0; + if (unlink(crashed_file) == -1 && errno == ENOENT) crashed = 0;