exit

How do I know the .exe that loaded my dll is about to exit?

I have a dll which is actually a com service that is registered and then being loaded by another .exe process. I would like when the user exit from the .exe to execute some resource closing steps from within my dll before it is too late. I tried to intercept the DLLPROCESSDETACH or DLLTHREADDETACH from the DllMain of my DLL but it seems ...

Disabling screen minimization animation effect in iPhone:

Hi All, Is it possible to disable the home screen minimize animation effect when user presses the home button on iPhone?. Or can we set our own custom image for minimize animation? Regards ypk ...

How can I tell my Cocoa application to quit from within the application itself?

I'm looking for a good way to tell my Cocoa application to quit itself. Rest assured that this will not be used for production code. I'm just looking for an easy way to run one test and then close the application during debugging. I have found that exit(0); will close the app, but it bypasses all of the normal application exit procedure...

atexit, exit delegate in c#

In c++ there is a function called atexit where you can register functions which should be run when the system exits. Are there any similar events in C#? UPDATE: The AppDomain.ProcessExit doesn't seem to catch Ctrl-C or Ctrl-Break. Anyone knows anything about that? ...

Php exit function question

I have noticed a behavior in PHP that makes sense, but I am unsure how to get around it. I have a long script, something like this <?php if ( file_exists("custom_version_of_this_file.php") ) { require_once "custom_version_of_this_file.php"; exit; } // a bunch of code etc function x () { // does something } ?> Interestin...

Executing an script with crontab returns 127 error code

I am executing a script manually on my UNIX system manually, it runs successfully and updated required records in ORACLE database. How ever when I exwcute the same script with crontab my process exits with the error code 127. On analysing further, I got there is some problem in these statements. LOGFILE=sachin ORALOGIN=abc/abc@abcd ...

What causes JVM exit code 10?

An Eclipse RCP aplication running on Mac OS X 10 is crashing with java exit code 10. What does this mean, and what might be a possible cause? Additional information: eclipse.buildId=unknown java.version=1.5.0_20 java.vendor=Apple Inc. BootLoader constants: OS=macosx, ARCH=x86, WS=carbon, NL=fi_FI Command-line arguments: -os macosx -ws ...

Signal 11, segmentation fault on iphone App exit

I have an iphone app. It seems to run fine. When I connect to a provisioned iphone to Xcode and run the App, the console log in the Organizer window, always complains about a Segmentation fault when quitting the app with the home key. Has anyone else seen this, and do you have an idea of what the problem might be? I use a thread to l...

Exit function On Linux

When reading/writing a file in my application, I want to exit(1) if the file is not closed correctly. On Windows it works well, but on Linux this error appears: ‘exit’ was not declared in this scope How can I solve that? Thanks. ...

How do I exit the command shell after it invokes a Perl script?

If I run a Perl script from a command prompt (c:\windows\system32\cmd.exe), how can I exit the command prompt after the script finishes executing. I tried system("exit 0") inside the Perl script but that doesn't exit the cmd prompt shell from where the Perl script is running. I also tried exit; command in the Perl script, but that does...

PHP as FastCGI and exit() function

How exactly is exit() function working when in fastcgi mode? does it finish whole instance of php process in fastcgi pool or just ends current request and return process to te pool? if the second answer - what causes logs of this kind: [warn] FastCGI: (dynamic) server "/php.fcgi" (pid 25113) terminated by calling exit with status '0' ...

what is the Flash event listener when flash is exiting?

Hi Guys, anybody knows how to make event listener for flash exiting? By mean exiting is when a tag that hold the flash object is removed so that you cant see the flash anymore... Thanks ...

in zsh, how do I do a conditional on the exit status of a program?

I wnat to do something like: if [[ git status &> /dev/null ]]; then echo "is a git repo"; else echo "is not a git repo"; fi except I don't know how to do checking on the exit status. How do I fix this? Thanks ...

Bourne Shell exit will not work

Hi, I have the following script cat $1 | while read line do line=`echo $line | tr "[:lower:]" "[:upper:]"` if [ "`echo $line | cut -f1 -d:`" = "foo" ] && \ [ "`echo $line | cut -f2 -d:`" = "bar" ]; then echo 'exsist' exit 1; fi done everything works up to echo and then when the script hits exit it ...

How to exit all the calling scripts in bash?

Hi, Lets say I have the following scripts a.sh echo in a if test 1 -ne 2; then echo oops exit 1 fi b.sh echo in b ./a.sh echo in b 2 When running b.sh, I want it to exit if a.sh exited. How do I do this? (The current output is in b in a oops in b 2 And that's not what I want) Thanks, Rivka ...

Handling Application Exit events RubyCocoa

Hi, I guess the title is very clear. I would like to handle the Application exit event in RubyCocoa in order to write a file just before closing. Thanks for your help ...

Test a lock with out acquiring it?

I have objects, they get locks. I want to test if they are locked without acquiring a lock. The idea is if I TryEnter() they i have to Exit() if true to only check the lock correctly. Seems like a really basic question, how is it done? ...

How can I add scala actors to an existing program without interfering with the normal termination behavior?

This program, after executing main(), does not exit. object Main { def main(args: Array[String]) { ... // existing code f() ... // existing code } def f() { import scala.actors.Actor._ val a = actor { loop { react { case msg: String => Syst...

How can I get a traceback in Perl?

Possible Duplicate: How do I force a stack backtrace for all fatal errors in Perl? One of the things I like about Python, is that when a script exits because of an error, it spits out a traceback. I'm wondering is there anyway of getting a Perl to do this as well? ...

Can I undo or remove an atexit command?

If I place atexit( fn ); on the exit stack, it will get executed when the program exits: returns from main() or via exit(). Can I remove it from the stack? Why do I want to do this, you ask? I was experimenting with a simple try-catch mechanism using atexit, setjmp and longjmp. It would be just perfect if I could undo-atexit(fn); - ev...