Top "Exit" questions

Exiting, quitting, or halting refers to the termination of a process or program.

Is there a way to write a bash function which aborts the whole execution, no matter how it is called?

I was using "exit 1" statement in my bash functions to terminate the whole script and it worked fine: function func() { …

bash function exit subshell
Exit with error code in go?

What's the idiomatic way to exit a program with some error code? The documentation for Exit says "The program terminates …

error-handling go exit
C++: execute a while loop until a key is pressed e.g. Esc?

Does anyone have a snippet of code that doesn't use windows.h to check for a key press within a …

c++ while-loop exit multiplatform onkeypress
Exit from a console application in C#

I read a lot of things here on stackoverflow, comments, opinions and every kind of ideas. But anyway, I really …

c# console exit exit-code
How to handle a SIGTERM

Is there a way in Java to handle a received SIGTERM?

java exit sigterm
Correct usage of exit() in c++?

I have written a simple application that reads a data file, parses the text and then does some processing on …

c++ function exit
python sys.exit not working in try

Python 2.7.5 (default, Feb 26 2014, 13:43:17) [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>&…

python python-2.7 redhat exit
What is the difference between using _exit() & exit() in a conventional Linux fork-exec?

I've been trying to figure out how the fork-exec mechanism is used inside Linux. Everything was going on according to …

c linux return fork exit
Disabling C++ exceptions, how can I make any std:: throw() immediately terminate?

This C++ program is a CGI script, I have no desire to deal with exceptions. I'd rather get a marginal …

c++ exception-handling g++ exit
What is the difference between exit and abort?

The abort documentation says abort will Terminate execution immediately, effectively by calling Kernel.exit(false). What exactly does "immediately" mean? …

ruby exit