Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Exit code in C++
Name: R.Hillier Date: July 1, 2002 at 08:31:26 Pacific
Comment:
Is it safe to use the exit() with a generated value.ie: exit(101); this generated value is read for a text file. ... I can't use the return()method, because the CALL programme is only detecting the exit code.
Yes it is safe unless you have a multi-threaded program.
exit() will kill the current thread as will and return. However, exit will call the functions registered by atexit and _onexit and flush all the buffers. This is fine for single threaded programs. For multi-threaded programs, it just exits the current thread.
There is also _exit() which will kill the program without calling the functions registered by atexit etc and all its threads.
Summary: I am running a perl script from vb. OK but I need to get access to the exit code from the perl script in the calling vb program. I can do it a long winded way via a batch file but I feel i'm missing s...
Summary: hello, sorry that i didn't reply to answers of my previous questions on "random number with probability", since i have finished the coding 2 days after (was feeling tired for a while). so i decided t...