📄 libc.texinfo
字号:
* Termination Signals:: Used to interrupt and/or terminate the program.* Alarm Signals:: Used to indicate expiration of timers.* Asynchronous I/O Signals:: Used to indicate input is available.* Job Control Signals:: Signals used to support job control.* Operation Error Signals:: Used to report operational system errors.* Miscellaneous Signals:: Miscellaneous Signals.* Signal Messages:: Printing a message describing a signal.Specifying Signal Actions* Basic Signal Handling:: The simple @code{signal} function.* Advanced Signal Handling:: The more powerful @code{sigaction} function.* Signal and Sigaction:: How those two functions interact.* Sigaction Function Example:: An example of using the sigaction function.* Flags for Sigaction:: Specifying options for signal handling.* Initial Signal Actions:: How programs inherit signal actions.Defining Signal Handlers* Handler Returns:: * Termination in Handler:: * Longjmp in Handler:: * Signals in Handler:: * Nonreentrancy:: * Atomic Data Access:: Generating Signals* Signaling Yourself:: Signaling Yourself* Signaling Another Process:: Send a signal to another process.* Permission for kill:: Permission for using @code{kill}* Kill Example:: Using @code{kill} for CommunicationBlocking Signals* Why Block:: The purpose of blocking signals.* Signal Sets:: How to specify which signals to block.* Process Signal Mask:: Blocking delivery of signals to your process during normal execution.* Testing for Delivery:: Blocking to Test for Delivery of a Signal* Blocking for Handler:: Blocking additional signals while a handler is being run.* Checking for Pending Signals::Checking for Pending Signals* Remembering a Signal:: How you can get almost the same effect as blocking a signal, by handling it and setting a flag to be tested later.Waiting for a Signal* Using Pause:: The simple way, using @code{pause}.* Pause Problems:: Why the simple way is often not very good.* Sigsuspend:: Reliably waiting for a specific signal.BSD Signal Handling* BSD Handler:: BSD Function to Establish a Handler.* Blocking in BSD:: BSD Functions for Blocking Signals Process Startup and Termination* Program Arguments:: Parsing your program's command-line arguments.* Environment Variables:: How to access parameters inherited from a parent process.* Program Termination:: How to cause a process to terminate and return status information to its parent.Program Arguments* Argument Syntax:: By convention, options start with a hyphen.* Parsing Options:: The @code{getopt} function.* Example of Getopt:: An example of parsing options with @code{getopt}.* Long Options:: GNU utilities should accept long-named options. Here is how to do that.* Long Option Example:: An example of using @code{getopt_long}.Environment Variables* Environment Access:: How to get and set the values of environment variables.* Standard Environment:: These environment variables have standard interpretations.Program Termination* Normal Termination:: If a program calls @code{exit}, a process terminates normally.* Exit Status:: The @code{exit status} provides information about why the process terminated. * Cleanups on Exit:: A process can run its own cleanup functions upon normal termination. * Aborting a Program:: The @code{abort} function causes abnormal program termination. * Termination Internals:: What happens when a process terminates.Child Processes* Running a Command:: The easy way to run another program.* Process Creation Concepts:: An overview of the hard way to do it.* Process Identification:: How to get the process ID of a process.* Creating a Process:: How to fork a child process.* Executing a File:: How to make a child execute another program.* Process Completion:: How to tell when a child process has completed.* Process Completion Status:: How to interpret the status value returned from a child process.* BSD Wait Functions:: More functions, for backward compatibility.* Process Creation Example:: A complete example program.Job Control* Concepts of Job Control :: Concepts of Job Control* Job Control is Optional:: Not all POSIX systems support job control.* Controlling Terminal:: How a process gets its controlling terminal.* Access to the Terminal:: How processes share the controlling terminal.* Orphaned Process Groups:: Jobs left after the user logs out.* Implementing a Shell:: What a shell must do to implement job control.* Functions for Job Control:: Functions to control process groups.Implementing a Job Control Shell* Data Structures:: Introduction to the sample shell.* Initializing the Shell:: What the shell must do to take responsibility for job control.* Launching Jobs:: Creating jobs to execute commands.* Foreground and Background:: Putting a job in foreground of background.* Stopped and Terminated Jobs:: Reporting job status.* Continuing Stopped Jobs:: How to continue a stopped job in the foreground or background.* Missing Pieces:: Other parts of the shell.Functions for Job Control* Identifying the Terminal:: Determining the controlling terminal's name.* Process Group Functions:: Functions for manipulating process groups.* Terminal Access Functions:: Functions for controlling terminal access.Users and Groups* User and Group IDs:: Each user and group has a unique numeric ID.* Process Persona:: The user IDs and group IDs of a process.* Why Change Persona:: Why a program might need to change its user and/or group IDs.* How Change Persona:: Restrictions on changing user and group IDs.* Reading Persona:: Examining the process's user and group IDs.* Setting User ID:: * Setting Groups:: * Enable/Disable Setuid:: * Setuid Program Example:: Setuid Program Example* Tips for Setuid:: * Who Logged In:: Getting the name of the user who logged in, or of the real user ID of the current process.* User Database:: Functions and data structures for accessing the user database.* Group Database:: Functions and data structures for accessing the group database.* Database Example:: Example program showing use of database inquiry functions.User Database* User Data Structure:: * Lookup User:: * Scanning All Users:: Scanning the List of All Users* Writing a User Entry:: Group Database* Group Data Structure:: * Lookup Group:: * Scanning All Groups:: Scanning the List of All GroupsSystem Information* Host Identification:: Determining the name of the machine.* Hardware/Software Type ID:: Determining the hardware type and operating system type.System Configuration Limits* General Limits:: Constants and functions that describe various process-related limits that have one uniform value for any given machine.* System Options:: Optional POSIX features.* Version Supported:: Version numbers of POSIX.1 and POSIX.2.* Sysconf:: Getting specific configuration values of general limits and system options.* Minimums:: Minimum values for general limits. * Limits for Files:: Size limitations on individual files. These can vary between file systems or even from file to file.* Options for Files:: Optional features that some files may support.* File Minimums:: Minimum values for file limits.* Pathconf:: Getting the limit values for a particular file. * Utility Limits:: Capacity limits of POSIX.2 utility programs.* Utility Minimums:: Minimum allowable values of those limits. * String Parameters:: Getting the default search path.Library Facilities that are Part of the C Language* Consistency Checking:: Using @code{assert} to abort if something ``impossible'' happens.* Variadic Functions:: Defining functions with varying numbers of arguments.* Null Pointer Constant:: The macro @code{NULL}.* Important Data Types:: Data types for object sizes.* Data Type Measurements:: Parameters of data type representations.Variadic Functions* Why Variadic:: Reasons for making functions take variable arguments.* How Variadic:: How to define and call variadic functions.* Argument Macros:: Detailed specification of the macros for accessing variable arguments.* Variadic Example:: A complete example.How Variadic Functions are Defined and Used* Variadic Prototypes:: How to make a prototype for a function with variable arguments.* Receiving Arguments:: Steps you must follow to access the optional argument values.* How Many Arguments:: How to decide whether there are more arguments.* Calling Variadics:: Things you need to know about calling variable arguments functions.Data Type Measurements* Width of Type:: How many bits does an integer type hold?* Range of Type:: What are the largest and smallest values that an integer type can hold?* Floating Type Macros:: Parameters that measure floating-point types.* Structure Measurement:: Getting measurements on structure types.Floating Type Macros* Floating Point Concepts:: Definitions of terminology.* Floating Point Parameters:: Dimensions, limits of floating point types.* IEEE Floating Point:: How one common representation is described.Library Maintenance* Installation:: How to configure, compile and install the GNU C library.* Reporting Bugs:: How to report bugs (if you want to get them fixed) and other troubles you may have with the GNU C library.* Porting:: How to port the GNU C library to a new machine or operating system.@c * Traditional C Compatibility:: Using the GNU C library with non-ANSI@c C compilers.* Contributors:: Who wrote what parts of the GNU C Library.Porting the GNU C Library* Hierarchy Conventions:: How the @file{sysdeps} hierarchy is layed out.* Porting to Unix:: Porting the library to an average Unix-like system.@end menu@comment Includes of all the individual chapters.@include intro.texi@include errno.texi@include memory.texi@include ctype.texi@include string.texi@include io.texi@include stdio.texi@include llio.texi@include filesys.texi@include pipe.texi@include socket.texi@include terminal.texi@include math.texi@include arith.texi@include search.texi@include pattern.texi@include time.texi@include mbyte.texi@include locale.texi@include setjmp.texi@include signal.texi@include startup.texi@include process.texi@include job.texi@include users.texi@include sysinfo.texi@include conf.texi@comment Includes of the appendices.@include lang.texi@include header.texi@include maint.texi@set lgpl-appendix@node Copying, Concept Index, Maintenance, Top@include lgpl.texinfo@node Concept Index, Type Index, Copying, Top@unnumbered Concept Index@printindex cp@node Type Index, Function Index, Concept Index, Top@unnumbered Type Index@printindex tp@node Function Index, Variable Index, Type Index, Top@unnumbered Function and Macro Index@printindex fn@node Variable Index, File Index, Function Index, Top@unnumbered Variable and Constant Macro Index@printindex vr@node File Index, , Variable Index, Top@unnumbered Program and File Index@printindex pg@shortcontents@contents@bye
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -