From fe75144008e9e9d9ac8920c4f99629795a955677 Mon Sep 17 00:00:00 2001 From: Herman Junge Date: Sun, 13 Sep 2015 14:36:42 -0300 Subject: [PATCH] Update syscall-4.md programm -> program --- SysCall/syscall-4.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SysCall/syscall-4.md b/SysCall/syscall-4.md index dac4183..489cbd1 100644 --- a/SysCall/syscall-4.md +++ b/SysCall/syscall-4.md @@ -22,7 +22,7 @@ In this part we will consider the way when we just launch an application from th ![ls shell](http://s14.postimg.org/d6jgidc7l/Screenshot_from_2015_09_07_17_31_55.png) -Let's consider what does occur when we launch an application from the shell, what does shell do when we write programm name, what does Linux kernel do and etc. But before we will start to consider these interesting things, I want to warn that this book is about the Linux kernel. That's why we will see Linux kernel internals related stuff mostly in this part. We will not consider in details what does shell do, we will not consider complex cases, for example subshells and etc. +Let's consider what does occur when we launch an application from the shell, what does shell do when we write program name, what does Linux kernel do and etc. But before we will start to consider these interesting things, I want to warn that this book is about the Linux kernel. That's why we will see Linux kernel internals related stuff mostly in this part. We will not consider in details what does shell do, we will not consider complex cases, for example subshells and etc. My default shell is - [bash](https://en.wikipedia.org/wiki/Bash_%28Unix_shell%29), so I will consider how do bash shell launches a program. So let's start. The `bash` shell as well as any program that written with [C](https://en.wikipedia.org/wiki/C_%28programming_language%29) programming language starts from the [main](https://en.wikipedia.org/wiki/Entry_point) function. If you will look on the source code of the `bash` shell, you will find the `main` function in the [shell.c](https://github.com/bminor/bash/blob/master/shell.c#L357) source code file. This function makes many different things before the main thread loop of the `bash` started to work. For example this function: