Hot answers tagged kernel
Bash knows nothing about ELF. It simply sees that you asked it to run an external program, so it passes the name you gave it as-is to execve(2). Knowledge of things like executable file formats, shebang lines, and execute permissions lives behind that syscall, in the kernel. (It is the same for other shells, though they may choose to use another function in ...
There are no more dedicated flush threads anymore. The Linux kernel has moved on to a worker thread model, where several generic worker threads can handle a variety of different tasks. You will see these in the process list as [kworker/#.##] Unfortunately this new design makes it a bit difficult to tell exactly what any given kworker thread is doing at any ...
Your analysis so far is generally correct. The way a shell might set the stdin of a process to a pipe descriptor could be (pseudocode): pipe(p) // create a new pipe with two handles p and p fork() // spawn a child process close(p) // close the write end of the pipe in the child dup2(p, 0) // duplicate the pipe descriptor on top of fd 0 ...
Files in /proc do not have a file size in general, and are shown as having 0 size in ls -l, but you can read data from them anyway (see man 5 proc). Try, for example: zcat /proc/config.gz | wc or: $ ls -l /proc/cmdline -r--r--r-- 1 root root 0 Aug 4 10:16 /proc/cmdline Looks empty. But: $ cat /proc/cmdline | wc 1 5 114 it contains ...
It is possible, yes. You need to pass init=/bin/sh to the kernel and you need to remember that the rootfs is most probably mounted ro afterwards. To directly run your program you need to tell the kernel to invoke it after configuring the hardware, but note that the normal userspace won't be available to your program.
A makefile recipe will stop executing if any command in it returns a failure status (unless the command is preceded by a -). The recipe you cited will ensure that /bsd only gets replaced if the cp bsd /nbsd command succeeds. The cp could fail if the partition were full or out of inodes.
Please keep in mind that not using the kernel distributed with Slackware may break your system. Apart of that, compiling the official kernel is a difficult task and takes its time. You can learn about how to compile your own or the official linux kernel on Kernelnewbies.org. Related: http://kernelnewbies.org/KernelBuild https://www.kernel.org
Assuming you are using Ubuntu, apt-get install linux-manual-3.2 or similar (pick the correct version). There is also another documentation package apt-get install linux-doc but this is html.
The content is parsed directly (see also this) from the source .c files1: In order to provide embedded, 'C' friendly, easy to maintain, but consistent and extractable documentation of the functions and data structures in the Linux kernel, the Linux kernel has adopted a consistent style for documenting functions and their parameters, and ...
FAT filenames (not file contents) are encoded in a country-specific manner, DOS called those "codepages". They need to be present in the kernel so your console con correctly display the characters. This also counts for the UTF-8 encoding of the Unicode charater set. This doesn't apply to ext FS though, read up here.
Yes, there is a man page in section 5 "File formats and conventions": man 5 proc It is surprisingly long, though - it describes 189 kinds of files in /proc.
Only top voted, non community-wiki answers of a minimum length are eligible