]> Zhao Yanbai Git Server - minix.git/commitdiff
When we receive a PROC_EVENT message from PM, exit nicely; avoids
authorBen Gras <ben@minix3.org>
Mon, 27 Apr 2009 12:02:31 +0000 (12:02 +0000)
committerBen Gras <ben@minix3.org>
Mon, 27 Apr 2009 12:02:31 +0000 (12:02 +0000)
annoying graceful RS timeout on unmount.

servers/mfs/main.c

index 6118748e65cc7e7ffbc7dfa4651ed2269e3bbc6b..b89b59803098807401e3650e71a904343a8a10a5 100644 (file)
@@ -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;
       }