In Linux, ports are maintained by IANA (Internet Assigned Numbers Authority, which has been assigned a numerical authority). port numbers are divided into three segments.
1. 0 ~ 1023. These ports have IANA allocation and control. If possible, the
Extracted from "UnixProgramDesign Art
Keep it simple, stupid!
Write a program that only does one thing and needs to be done well; write a program that can work together and write a program that processes text streams, because this is a common
*** Is not in the sudoers file.This incident will be reported ."(The user is not in the sudoers file ......)
It is very easy to solve this problem, but you should first understand its principles before proceeding.First of all, you must understand
First, learn the basic machine programming of [blocking illegal words.
For those who want to learn hardware, they must first have a perceptual knowledge of the basic hardware usage methods, and have a deep understanding of the hardware control
1. The return unit is milliseconds.
# Include DWORD dwstart = gettickcount ();// Test code
DWORD dwtime = gettickcount ()-dwstart;
Note: gettickcount () has a limited precision, which is related to the CPU. Generally, the accuracy is around 16 ms,
Error Code 88 enotsock _ socket operation on Non-socket
Cause of error: the error code is as follows:
If (sockfd = socket (af_inet, sock_stream, 0)
The correct code should be to enclose sockfd = socket (af_inet, sock_stream, 0) in parentheses.
1. Visit codesourcery official website to download the latest arm cross compilation tool chain, the latest version is arm-2009q3:
Bytes
$ Tar-jxvf arm-2009q3-67-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz23. Move to/usr below MV arm-2009q3/usr/4.
When implementing web server, you can create a thread pool to concurrently process HTTP requests from the client. The Code is as follows:
For (I = 0; I { pthread_create (& thread_pool [I], null, (void *) & worker, (void *) I); pthread_detach
This article takes Ubuntu as an example.
Step 1: Install apache2
1) Check whether Apache is installed: apachectl-V is displayed if it is installed.
Server version: Apache/2.2.22 (UBUNTU)2) If the installation is not installed, enter the command sudo
1. Signal Generation The signals in Linux are similar to those in DOS Int or windows.
There are two sources for the occurrence of signal events: one is the cause of hardware (for example, pressing the keyboard) and the other is the cause of software
1. Module (driver)
A module is a program running in the kernel space. It is actually a target object file that can be dynamically loaded to the system for running as part of the kernel.
For a hardware driver in Linux, you can use either of the
Due to various I/O loads, the default configurations of file systems in Linux are generally moderate, emphasizing general applicability. However, in a specific application, this configuration is often unable to achieve optimal I/O performance.
This year's main job is to take a good look at Linux kernel. Currently, compilation is not a problem. Here are some specific porting work. The following describes the main tasks involved:
(1) virtual machine simulation tool made in Skyeye
(2)
1. LDD is not an executable program, but a shell script.
2. LDD can display the dependency of the executable module. The principle is to set a series of environment variables, such as ld_trace_loaded_objects, ld_warn, ld_bind_now, ld_library_version,
This document is not a Linux/Unix Command manual, but a common method for some commands.Cat
Concatenate files and print on the standard output.
Usually used to output all the content of a file to the standard output: 'cat file'Find
Search for files
Recently, I transplanted a Windows program to Linux and found that the two operating systems have different naming methods for many data types, for example, in windows, the unsigned data types are generally U + X, such as uint, uchar, and ulong. in
This program is intended for Linux IPC communication beginners to practice basic concepts such as Message Queue communication mechanism, multi-thread programming, string processing, linked list operation, and simple signal processing in
We can compile and create a cross-compile toolchain by ourselves. However, for convenience and stability, we usually choose a mature third-party toolchain.
Codesourcery's cross tool chain is a very common, taking arm as an example, we can go from
When you execute make, make searches for the makefile (or makefile) text file in the current directory, and The makefile records details about how to compile the original code! Make automatically checks whether the original code has been changed and
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service