You can pass int main (int Argc, char * argv [], char * envp []); Envp is to view environment variables for all Environment Variables ENV View ID ID You can get the system's variable getuid get the current user ID number. SetUID Modify the ID number of the current program (must have permissions) Finger command to view the user login Status Find Unix Mount PStack View the stack of PStack in etc / passwd Use Exec to execute a program to exit one by exit process
When you need to exit the program, you have to exit some resources, such as file connections, network connections, etc. _exit's priority than EXIT (0), as long as the former is defined, the latter will not be called environment variables Place how to communicate between the global data area process, so that a process can use the data area of another process using the fork function to create a process number returned by the current process running a one-touch process parent process returned for a child process, The child process returns to zero; the parent process cannot hang the child process, which is a privileged process Service packages the function of the privilege processing, so that the normal program, the process can call the function to call the privilege, (NT distinguishes between privilege functions and common functions) The parent process and sub-process needs to be synchronized between the parent process and the sub-process in the file sharing process. Wait until a child process exits, then the parent process will go down Wait The function is only available for the parent process to create a new process, and the program is running, while Exec is utilized to run the current process. Many functions have a parameter, character, or integer pointer to hold SYSTEMs that are equivalent to a combination of FORK () exec () Wait () fork () is a system call usage setting bit whether the user is If you log in, you can run the program with the right user of the file, you can only modify the setting bit through the root user, you can call the system function.
The polling can be used to communicate between multiple processes, but it is too wasteful to use a process SLEEP to wait until another process message is sent to the process, and the task Signal Handler: Void (* fp) (int); Signal (int, fp) typef void (* fp) (int) void func1 (); void func2 (); Signal (SIGINT, FUNC1); SIGNAL (SIGINT FUNC2); RETURN FUNC1 can not use the global variable The reusable functions will not wait for all system calls without all system calls, all system calls are not allowed to allocate space in the program. There is an errno to display. The reason for the wrong, and there is a reason for PERROR to print an error. The standard C function will help you allocate the memory space ALARM function to adjust once, neglect and mask are different. The former does not process the signal at all, and the latter will then process the process of processing the signal in the system function. The process that is called by the SIGINT will be ignored. SIGQUIT signal, blocked calls Sigchldcmd followed by Daemon
Share Memory is mainly used to drive the device FIFO and Socket compare multiple ducts are unidirectional. If you implement two-way communication, you can create two pipe PIPE functions to create a pipe, and the pipe can only be created between the parent class and the subclass. The use of a naming pipe can make the different processes can perform the amount of communication signals in the entire operating system range Int semget (key_t key, int nsems, int semflg); setting Key is KEY every process This key is available, and NSEMS is used to set the message in which the message in which a large array message queue can be taken. No need to sequentially take the first parameter in the MSG. If it is defined as IPC_Private, there is only a relationship process. Can get the function of the message message queue, the function: msgctl, msgsnd, msgrcv, etc. Current message queue IPCS, delete the message ipcrMemory mapping through a file to share the shared memory to the Read, Write method, Write, time, There must be a process read, read, and read, there must be Write's method to implement if a process is only read by reading, and that program will have been clogging, waiting for other processes to write, if it is open If the process is later written, the program does not do anything, then the process ends because the operating system believes that you have written and read the right to read, so it is closed, if you use a plug-in method The execution message waiting for other processes will still exist after the program exits, but the pipeline is after the process exits, there is no unique key from the program, using FTOK ();
IP Current Process Pointer SP Current Stack Pointer
To perform UNIX thread, add the following statement when compiling:, if: g abc.cc -lpthread (Linux has been installed on the library) to get the return value of the thread by pthread_join, will wait for the end of the process However, there is no previous logic, and the SLEEP function has an impact on the process. For example, you are in the thread but this also affects the process itself MESG to see if the current message Unix is opened.
{
How to fliminate in Unix, (no way) What is POS? signal? What is the representative of the three groups of RWX? How to use (can use the setting bit) TypeDef has always made out what is the difference between SigSet and Signal calls, is it not all setting signals? How is the message queue created? How to make a process waited for another process to execute
}