Reclaim process user space resource exit () function _ exit () function atexit () function on_exit () function, _ exitatexitAbstract:This article describes how to terminate a process and how to use the exit () function to terminate the process and
Abstract:This article describes how to terminate a process and how to use the exit () function to terminate the process and reclaim the user space resources of the process. It analyzes the exit () function and the _ exit () function, difference in
Linux Shell Bash with special meaning exit code purpose descriptionThe exit command exits the current shell and can terminate the current script execution in a shell script.Common parametersFormat: Exit nExit. Set the exit code to N. (cause the
Note: Exit () is exited, the parameters passed in is the program exit status code, 0 for normal exit, the other means the abnormal exit, generally used-1 or 1, standard C has exit_success and exit_failure two macros, with exit (exit_success) ,
Exit () and _ exit () and return, exit_exitreturnThe difference between exit () and return: According to ansi c, return and exit () are used in the originally called main () with the same effect. However, note that "initial call" is used here ". If
I have been engaged in Android development for some time. I believe that many Android programmers developed from Windows will habitually encounter the same problem as me: how to exit the program completely? My own experience is not authoritative and
Process 1 is the main first process init of all processes
How to view the process: PS uax
# Include # Include # Include # Include
Int main (){Pid_t PID;Int A = 8;Printf ("current process ID: % d \ n", getpid ());PID = fork ();If (pid> 0) // What
1. ERROR/1The system is primarily used to define internal errors: There are 10 types of run time error built into Erlang:Function_clause/case_clause/if_clause/badmatch/badarg/undef/badarith/badfun/badarity/system_limit, For example: 1>
The main differences between the Exit function and the return function are:
Exit is used to end the program at any time while the program is running, and its parameters are returned to the OS. You can also say this: The Exit function exits the
Now I've written a Hello World program to take a look at it:
Filename:main.c
#include
int main (void)
{
printf ("Hello wolrd!\n");
return (-);
}
Compile execution: gcc main.c &&/a.out
Now let's take a look at the return
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.