exit

How to know where the script stopped?

I was wondering if there was a way to know where the script stopped (ie: file + line), which would be useful for debugging or for removing stupid 'exit' calls lost somewhere in the code. Thanks in advance ...

ExitCode of -1 returned to C#

In my C# application, I'm firing up a program using the .NET Process class. Sometimes, after the program has finished, the Process.ExitCode is -1. It's a large program, and I'm having trouble tracking down where `exit' is called with -1. In fact, I don't see how it's possible to have a program return an exit code of -1. I've created ...

How do I make a C++ console program exit?

Is there a line of code that will terminate the program? Something like python's sys.exit()? ...

Bash script not exiting immediately when `exit` is called

I have the following bash script: tail -F -n0 /private/var/log/system.log | while read line do if [ ! `echo $line | grep -c 'launchd'` -eq 0 ]; then echo 'launchd message' exit 0 fi done For some reason, it is echoing launchd message, waiting for a full 5 seconds, and then exiting. Why is this happening and h...

Exit button, without saving to database when items have already been added

I do not have any code to show, but using asp.net, vb.net, and SQL with stored procedures. If on a page I have an item that is added to the database and therefore that information is "saved", is there a way to have an ("exit without saving") button on the page that does away with those changes? Using infragisitcs ultrawebgrid, you add ...