LINUX system call list
content:
I. Process Control II, File System Control III, System Control IV, Memory Management V. Network Management Six, Socket Control Seven, User Management Eight, Process Communication Reference Information About Authors
Lei Town (Leicool@21cn.com) March 2002
This article lists most common Linux system calls and comes with a brief Chinese description.
The following is a list of Linux system calls, which contains most common system calls and functions derived by the system call. This may be a list of Linux system calls that you can see on the Internet, even simple alphabetical English lists, it is very rare to do so. According to the practice, this list is based on the MAN Pages Section 2, that is, the system call festival is blue. According to the author's understanding, it has made a roughly classification, and it has made some small modifications. Several systems are deleted only for kernel usage, and the system calls that are not allowed to call, the place to be a little bit very sensitive to individuals Make some small modifications and attach a brief annotation to all listed system calls. Some of these functions are exactly the same, but the parameters are different. (Many familiar C friends can go to Lenovo, but don't forget that Linux core is written in C language, so only different function names can be made). There are also some functions that have been outdated, replaced by new better functions (GCC issues a warning when linking these functions), but because of compatible reasons, these functions I will marry "*" in front. Differentiate differently. First, process control:
Fork Create a new process Clone Press the specified condition Create sub-process EXECVE Run executable EXIT abort process_exit Annually abort the current process getDTablesize process How to open the maximum file GetPgID Get specified process group identification number setPGID Settings specified process group flag number getPGRP Get the current process group identification number setPGRP Set the current process group flag number getPID Get Procedure Identification number getPPID Get Parent Process Identification Number GetPriority Get Scheduling Priority SetPriority Settings Scheduling Priority MODIFY_LDT Read Write Process Local Description Table NANOSLEP Specifies the time Nice changing the time-sharing process priority pause suspends the process, waiting for the signal personality setting process is running domain prctl to process a particular operation ptrace process tracking sched_get_priority_max get static priority ceiling sched_get_priority_min get static priority scheduling parameters to obtain the lower limit sched_getparam process of obtaining sched_getscheduler Specified Scheduling Policy SCHED_RR_GET_INTERVAL acquires the time slice length of the real-time process of the RR algorithm scheduled SCHED_SETSCHEDULER Setting the scheduled schedule and parameter SCHED_YIELD process proactive to let the processor, and wait for the queue tail vfork Create a child process for new programs, often using Wait Wait, etc., often use Wait3, etc., see WaitWaitPID Waiting for the Sub-process Termination WAIT4 See WaitPidCapGet Get Procedure Capset Settings Procedure GetSid Get Messigation Number Setsid Settings Second, file system control 1, file read and write operation
FCNTL file Control Open Open File CREAT Creating a New File CLOSE Close File Description Word Read File Write Write Readv From File Data into Buffer Arch Writev Write the data in the buffer number to file pread to file randomly read PWRITE Write LSEEK mobile file pointer _llseek mobile file pointer in 64-bit address space DUP DUP Copy Opened File Description Word DUP2 Press specified condition Copy file Description word flock file plus / unlock Polli / O multi-channel Truncate truncated file Ftruncate See Truncateumask settings File Permissions Mask FSYNC writes the file back to disk 2 in memory 2. The file system operation access determines the accessibility ChDIR to change the current work directory FCHDIR to see ChDIRCHMOD to change file mode FCHMOD to see ChmodChown changes file owner or user group fchown see chownlchown see chownchroot change the root file status information lstat take stat see statfstat see statstatfs take file system information fstatfs see statfsreaddir read the directory entry directory entry read getdents mkdir to create a directory mknod to create an index node rmdir remove directory rename rename the file link create link Symlink Creating a Symbol Link Unlink Delete Link Readlink Read Symbol Linked Valink Read Symbol Link User Mount Umount Removing File System USTAT Take File System Information UTIME Change File Access Modification Time UTIMES See UtimeQuotactL Control Disk Quota 3, System Control
IOCTLI / O Total Control Function_sysctl Read / Write System Parameters ACCT Enabled or Disable Procedure Account Account Gtrlimit Get System Resource Limit Strimit Set System Resource Limit Gtrusage Get System Resource Usage USELIB Select the Binary Library IOPERM Settings Port I / O Permissions IOPL Change Process I / O Permissions Level OUTB Low Port Operation Reboot Restart SWAPON Open Swap Document and Device Swapoff Close Exchange File and Device BDFLUSH Control BDFLUSH Triggering Sysfs Take the core Supported file system type Sysinfo acquire system information Adjtimex adjustment system clock Alarm Setting Process Alarm GetitiMer Get Timener Value Settimer Settings Timer Value GetTimeOfDay Tetting Time and Time Zone SetTimeOfDay Setting Time and Time Zone STIME Setting System Date and Time Time Time Time Times Take Process Run Time Uname Get the name, version and host of the current UNIX system and other information vhangup suspend the current terminal nfsservctl of NFS daemons vm86 into the analog control mode create_module 8086 to create a loadable module entry delete_module delete loadable module entry init_module query module initialization module query_module information * get_kernel_syms obtain core symbols, has been replaced query_module Fourth, memory management
BRK Change Data Section Space Allocation SBRK See BRKMLOCK Memory Page Page Page Page Munlock Memory Page Unlock MLOCKALL Call Process All Memory Page Page MunlockAll Call Process All Memory Page MunMap Remove Mount Map MREMAP Remap Virtual Memory Address MSYNC Write the data in memory in memory MProtect Setting Memory Image Protection GetPagesize Get Page Size SYNC Write the Memory Buffer Data Back to Hard Disk Cacheflush Write the contents of the content in the specified buffer to disk 5. Network management
GetDomainName Take the domain name setdomainname Set the domain name gethostID Get the host identification number of the host identification number GETHOSTNAME Get this host name SETHOSTNAME Set the host name 6, Socket control
socketcallsocket socket system call to bind a socket to a port to establish socketbind connect socket connection to the remote host in response to accept the connection request sent by the send information sendto sends UDP socket sendmsg see sendrecv receiving information through the socket receives a UDP recvfrom recvmsg see recvlisten listening socket port of the multiplexer select Synchronous I / O Convergence GetDown Close Socket Connection GetSockName Get Local Socket Name GetPeerName Gets Communication Metail Socket Name GetSockOpt Take Port Setting SetsockOpt Settings Port Parameters SocketPAIR Create a pair of unnamed Socket 7. User Management GetUID Get User ID SETUID Set User Sign Number GETGID Gets Group IdG SETGID Setup Group Sign No GetEgID Get A Valid Group Identification SetEgID Sets Valid Group Identification Number GetEuID Get A Valid User ID SETEUID Set the valid user identification number setRegID Setting the real and efficient group identification Setreuid Setting the real and valid user identification number GetResgID Get real, efficient and saved group identification SETRESGID SupreSGID, respectively, set real, effective and saved group identity GetResuid Get real, effective and saved user identification numbers setResuID set real, efficient, and saved user identification number setFSGID setup file system check When the user ID used in the file system check No. getGroups After getting the replenishment group flag list setGroups setup group flag list eight, inter-process communication
Inter-IPC process communication total control call 1, signal
SIGACTION Setting Method SigProcmask performs blocking / release blocked signals for the specified signal to perform the blocking / release signal set queue SIGSUSPEND Signal Signal for the Specific Signal Signal to Severe Signals Signal Signal Severe Signals Signals Signing Signal Signal Signal Signal Signal Signals Signals Signing Signal Signal Signal Signal * Sigblock adds a signal to the blocked signal mask, which has been replaced by SigProcmask. * SiggetMask has obtained an existing blocking signal mask, which has been replaced by SigProcmask * SigSetMask to replace the existing blocking signal mask with a given signal mask, has been replaced by SigProcmask * Sigmask converts a given signal into a mask, which has been replaced by SigProcmask. * Sigpause functions with SigSuspend, has been filed by SigSuspend instead of SIGVEC as a compatible BSD, and a signal processing function similar to SIGACTIONSSETMASKANSI C is similar to SigAction 2. news
MSGCTL Message Control Operation MSGGET Get Message Queuing MSGSND Send Message MSGRCV Take Message 3, Pipeline
PIPE creates a pipeline 4, semaphore
SemctL semaphore control Semget acquires a set of semo-semoP semaphore operations 5, shared memory
SHMCTL Control Shared Memory SHMGET Get Shared Memory SHMAT Connection Shared Memory SHMDT Removal Shared Memory Reference:
LINUX MAN PAGES Advanced Programming in The Unix Environment, W. Richard Stevens, 1993
Author brief introduction Lei Town, you can contact him via email leicool@21cn.com.