diff options
Diffstat (limited to 'posts')
| -rw-r--r-- | posts/2021-12-25-running-golang-application-as-pid1.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/posts/2021-12-25-running-golang-application-as-pid1.md b/posts/2021-12-25-running-golang-application-as-pid1.md index cfbf447..62687ce 100644 --- a/posts/2021-12-25-running-golang-application-as-pid1.md +++ b/posts/2021-12-25-running-golang-application-as-pid1.md | |||
| @@ -89,7 +89,7 @@ time make -j `nproc` | |||
| 89 | cd .. | 89 | cd .. |
| 90 | ``` | 90 | ``` |
| 91 | 91 | ||
| 92 | At this point we have kernel image that is located in `arch/x86_64/boot/bzImage`. We will use this this in QEMU later. | 92 | At this point we have kernel image that is located in `arch/x86_64/boot/bzImage`. We will use this in QEMU later. |
| 93 | 93 | ||
| 94 | To make our lives a bit easier lets move the kernel image to another place. Lets create a folder `bin/` in the root of our project with `mkdir -p bin`. | 94 | To make our lives a bit easier lets move the kernel image to another place. Lets create a folder `bin/` in the root of our project with `mkdir -p bin`. |
| 95 | 95 | ||
| @@ -128,7 +128,7 @@ func main() { | |||
| 128 | } | 128 | } |
| 129 | ``` | 129 | ``` |
| 130 | 130 | ||
| 131 | If you notice, we have a forever loop in the main, with a simple sleep of 1 second to not overwhelm the CPU. This is because PID 1 should never complete and exit. That would result in kernel panic. | 131 | If you notice, we have a forever loop in the main, with a simple sleep of 1 second to not overwhelm the CPU. This is because PID 1 should never complete and/or exit. That would result in a kernel panic. Which is BAD! |
| 132 | 132 | ||
| 133 | There are two ways of compiling Golang application. Statically and dynamically. | 133 | There are two ways of compiling Golang application. Statically and dynamically. |
| 134 | 134 | ||
