Ozzi wrote: > Thomas Christian Chust wrote: > >> I think it would suffice for daemonize to wrap the call to the daemon's >> main procedure in a dynamic-wind block and call the cleanup function >> from the exit thunk. Unless the daemon procedure terminates itself with >> a low-level _exit or by sending itself a kill signal, the cleanup code >> should then always be executed. > > > Ok, I think I understand what you're getting it. Unfortunately I can't > get it to work. You'll have to excuse the thrown-together quality of the > code below, but it demonstrates the problem I have. Perhaps I am just > mis-using dynamic-wind, or I have to use something besides (exit) when > catching the kill signal, I'm not sure. > [...]
Oops 8-( On my machine this fails as well -- I was apparently mistaken thinking that (exit) would honor dynamic-wind guards. In that case you could still use (on-exit CLEANUP-PROC), though. cu, Thomas _______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users