From: Ben Gras Date: Mon, 27 Apr 2009 12:02:31 +0000 (+0000) Subject: When we receive a PROC_EVENT message from PM, exit nicely; avoids X-Git-Tag: v3.1.4~68 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=60e7602aad5a54a9bc5be2b9e9a9ba00ba3fa6a2;p=minix.git When we receive a PROC_EVENT message from PM, exit nicely; avoids annoying graceful RS timeout on unmount. --- diff --git a/servers/mfs/main.c b/servers/mfs/main.c index 6118748e6..b89b59803 100644 --- a/servers/mfs/main.c +++ b/servers/mfs/main.c @@ -67,12 +67,13 @@ PUBLIC int main(void) who_e = fs_m_in.m_source; if (who_e != FS_PROC_NR) { if (who_e == 0) { - /* - printf("MFS(%d): MSG from PM\n", SELF_E); - error = 1; - fs_m_out.m_type = error; - reply(who_e, &fs_m_out); - */ + if(fs_m_in.m_type == PROC_EVENT) { + /* A signal from PM: this means we're getting killed. + * Exit nicely. + */ + fs_sync(); + exit(0); + } } continue; }