Linux call list

Source: Internet
Author: User
Linux system call list-Linux general technology-Linux programming and kernel information. The following is a detailed description. The following is a list of Linux system calls, including most common system calls and functions derived from system calls. This may be the only Linux system call list with Chinese notes that you can see on the Internet. Even a simple list of English letters in alphabetical order, it is rare to achieve this completely.

By convention, this list is based on man pages section 2nd, that is, the system call section. According to my understanding, I made a rough classification and made some small changes. I deleted a few system calls that are only used by the kernel and are not allowed to be called by users, I have made some minor changes to some areas that I may find inappropriate, and attached a brief comment to all listed system calls.

Some functions have the same effect, but the parameters are different. (Many people who are familiar with C ++ can immediately think of function overloading, but do not forget that the Linux core is written in C language, so they can only get different function names ). Some other functions are outdated and replaced by new and better functions (gcc issues a warning when linking these functions), but they are retained for compatibility reasons, for these functions, I will mark "*" as a difference.

I. Process Control:



Fork creates a new process
Clone creates sub-processes based on specified conditions
Execve run executable files
Exit to stop the process
_ Exit: stop the current process immediately.
Maximum number of files that can be opened by the getdtablesize Process
Getpgid: obtains the ID of a specified process group.
Setpgid: Set the flag number of the specified process group
Getpgrp get the ID of the current process group
Setpgrp: Set the flag number of the current process group
Getpid
Getppid: Get the ID of the parent process
Getpriority get scheduling priority
Setpriority: set Scheduling Priority
Modify_ldt local description table of the read/write process
The time specified by nanosleep to sleep the process
Nice changes the priority of time-based processes
Pause Suspends the process and waits for a signal
Personality sets the process running domain
Prctl performs specific operations on the Process
Ptrace process tracing
Sched_get_priority_max obtains the maximum static priority.
Sched_get_priority_min obtains the lower limit of the static priority.
Sched_getparam obtains the scheduling parameters of a process.
Sched_getscheduler get the scheduling policy of the specified process
Sched_rr_get_interval gets the length of time slice of the real-time process scheduled by RR Algorithm
Sched_setparam
Sched_setscheduler set the Scheduling Policies and parameters of the specified process
The sched_yield process takes the initiative to let out the processor and waits for itself to be at the end of the scheduling queue
Vfork creates a sub-process for executing new programs. It is often used together with execve.
Wait waits for the sub-process to terminate
For more information about wait3, see wait.
Waitpid waits for the specified sub-process to terminate
For more information about wait4, see waitpid.
Capget
Capset sets process Permissions
Getsid
Setsid: set the meeting ID
Ii. File System Control


1. file read/write operations


Fcntl file control
Open File
Creat create a new file
Close file description
Read a file
Write a file
Readv reads data from a file into a buffer Array
Writev writes data in the buffer array to a file.
Pread random File Read
Pwrite random write to files
Lseek move file pointer
_ Llseek move the file pointer in a 64-bit address space
Dup copies the description of an opened file.
Dup2 copies the file Description Based on specified conditions
Flock file addition/unlock
Poll I/O multiplexing
Truncate
For more information about ftruncate, see truncate.
Umask sets the File Permission mask
Fsync writes part of the file in the memory back to the disk



2. File System Operations


Access determines the file accessibility
Chdir changes the current working directory
For more information about fchdir, see chdir.
Chmod changes file Mode
For more information about fchmod, see chmod.
Chown changes the owner or user group of the file
For more information about fchown, see chown.
For more information about lchown, see chown.
Chroot changes the root directory
Stat obtains the File status information.
For lstat, see stat.
For fstat, see stat.
Statfs obtains the file system information
For more information about fstatfs, see statfs.
Readdir
Getdents reads directory items
Mkdir create directory
Mknod
Rmdir Delete directory
Rename file name
Link creation link
Symlink
Unlink deletion Link
Readlink read symbolic link value
Mount the File System
Umount detaches the File System
Ustat obtains the file system information
Utime changes the file access modification time
For more information about utimes, see utime.
Quotactl controls the disk quota
Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.