Customer-Server programming method and Client Server programmingCustomer-Server programming method
The Client Server programming method is thoroughly described in the first volume of unix network programming. This article omitted the coding details
TinyWeb server code analysisTiny Web server code analysis
A small but fully functional web server called Tiny has been developed in "deep understanding of computer systems". Here is the source code parsing of the Tiny server.1. Tiny main
Specific Code Implementation of shell with basic functions in Linux (details)
I have been interacting with shell for the last few months, and I feel shell is full of mystery. I accidentally saw an article explaining the implementation of shell, and
Linux C language exit function explanation
The C standard defines the following exit functions: # Include void exit (INT status); void _ exit (INT status); int atexit (void (* function) (void); function introduction: void exit (INT status) The
1. who printed the segmentation fault string in shell?This string is actually printed by bash (or another shell), rather than the current error process or kernel. For more information, see Bash Source code Waitpid (-1, & status, 0) statement.
In Unix systems, the only way to create a new process is to call the fork system. The process called fork is called the parent process, and the newly created process is called the child process. Syntax format of system call:
PID = fork ();
When
There are more or less several scripts for programmers and network administrators in Linux. Flexible variable types and powerful regular expressions in script languageProcessing capabilities, coupled with the pipelines, redirection, and rich command
Yesterday I wrote several lines of code for a fork function.
# Include # Include
Int main (){Pid_t PID;
If (pid = fork () = 0)Cout
Cout
Return 0;}
The running result is as follows:
2629 Hello world!0 child0 Hello world!That is, after fork
It took about a month to classify Redis code from the very beginning, from the struct structure analysis to the final analysis of the main program, the code of each major module breaks through and learns from each other one by one. In short, it has
Inter-process communication in Linux (5): Shared Memory (on)
One obvious advantage of using shared memory communication is high efficiency, because the process can directly read and write the memory without any data copying. For communication
The configuration of Apache is configured by the httpd.conf file, so the following configuration directives are modified in the httpd.conf file.Configuration of the primary site (basic configuration)(1) Basic configuration:ServerRoot
The configuration of Apache is configured by the httpd.conf file, so the following configuration directives are modified in the httpd.conf file.Configuration of the primary site (basic configuration)(1) Basic configuration:ServerRoot
Linux system () and Popen () Differences 1. Introduction to System () and Popen ()In Linux we can execute a shell command through system (), and Popen () executes shell commands and communicates through pipelines and shell commands.System (), Popen (
Linux schedules the operation of a process by maintaining five states. These five states are: Run, interruptible, non-interruptible, zombie, stop.PID to identify different processes, each of the processes in Linux has a unique process number.A PCB
(1) Definition of fork ()The fork () function is the only way to derive a new process from UNIX, declared as follows:[CPP]View Plaincopy
#include
pid_t fork (void);
What we need to understand is that by invoking the fork ()
Inter-process Communication overview
Reasons for requiring process communication:Data transmissionResource sharingNotification eventsProcess ControlThe evolution of inter-process communication (IPC) in LinuxUNIX Inter-process
Shared storage allows two or more processes to share a given storage area. Because the data does not need to be in the client andReplication between servers, so this is the fastest kind of I P C.The only trick to using shared storage is that
These two days to learn something a little more, feel completely coping but come, have been digesting these days to learn things so 2 ,3 ,4 of the study content did not summarize in a timely manner, In this expressed deep guilt, today to learn these
1. Inheritance of open files between Processes 1.1. To inherit open files with forkThe child process after the fork automatically inherits the open file of the parent process, and after inheritance, the parent process closes the open file without
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.