chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] daemonize egg: redirect I/O?


From: Thomas Christian Chust
Subject: Re: [Chicken-users] daemonize egg: redirect I/O?
Date: Wed, 31 Oct 2007 13:52:56 +0100
User-agent: Thunderbird 2.0.0.6 (Macintosh/20070728)

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]