blob: 394ac26c4f5d3acbad63bfbcd6ce8e2e44871e7b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
From 0aacf0e59985185e7d4a88e3dd72aed62ad87926 Mon Sep 17 00:00:00 2001
From: Mikael Magnusson <mikma@users.sourceforge.net>
Date: Thu, 29 Nov 2018 22:10:42 +0000
Subject: [PATCH 3/3] docker: fix problem stopping container
---
state.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/state.c b/state.c
index ccf4104..bd59d7e 100644
--- a/state.c
+++ b/state.c
@@ -157,18 +157,7 @@ static void state_enter(void)
else
LOG("- reboot -\n");
- /* Allow time for last message to reach serial console, etc */
- sleep(1);
-
- /* We have to fork here, since the kernel calls do_exit(EXIT_SUCCESS)
- * in linux/kernel/sys.c, which can cause the machine to panic when
- * the init process exits... */
- if (!vfork( )) { /* child */
- reboot(reboot_event);
- _exit(EXIT_SUCCESS);
- }
- while (1)
- sleep(1);
+ exit(0);
#else
exit(0);
#endif
--
2.17.1
|