Fix filesystems not unmounted at shutdown

Instead of unconditionally waiting 2 seconds for processes to die,
check continuously for remaining processes, and break the loop when
none remain.

Turn PID 1 to a RT process with highest priority 99 during shutdown,
this ensures it would not be preempted by other RT processes.

Signed-off-by: Robert Andersson <robert.m.andersson@atlascopco.com>
Signed-off-by: Mathias Thore <mathias.thore@atlascopco.com>
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
This commit is contained in:
Ming Liu committed 2022-02-07 10:06:36 +01:00
1 parent 6ec1ab3d4f
commit 3e0063e874
3 files changed
+70 -5

No files matched your search

+1
View File
@@ -64,6 +64,7 @@ char *sig2str (int sig);
char *code2str (int code);
void do_sleep (unsigned int sec);
void do_usleep (unsigned int usec);
long jiffies (void);
char *uptime (long secs, char *buf, size_t len);
char *memsz (uint64_t sz, char *buf, size_t len);