[nas] Clients die upon server death -- workaround?
Raymond Toy
toy at rtp.ericsson.se
Thu Jan 23 11:17:03 MST 2003
>>>>> "Jon" == Jon Trulson <jon at radscan.com> writes:
Jon> On Tue, 21 Jan 2003, Rine, Robert wrote:
>> Date: Tue, 21 Jan 2003 10:48:35 -0500
>> From: "Rine, Robert" <robert.rine at lmco.com>
>> To: "'nas at radscan.com'" <nas at radscan.com>
>> Subject: [nas] Clients die upon server death -- workaround?
>>
>> Hello,
>>
>> I have a question regarding the behavior of NAS clients when the server
>> is killed. Currently, the app I'm working on, which acts as a client
>> connecting to an NAS server, dies immediately when the server is killed.
>> >From what I can tell, this is the default behavior.
>>
Jon> Yes...
>> My question is this: Is there any way of keeping the client app from
>> dying when the server it is connected to is killed? I want the app to
>> continue running whether the audio is functional or not. Lack of audio does
>> not diminish the functionality, and there is no reason to exit simply
>> because the audio is no longer working. I've had no luck trying to solve
>> this, and any help will be greatly appreciated. Thank you.
Jon> Not without a little hackery. libaudio (like X11) lets you
Jon> specify your own error handler that will execute when such problems occur.
Jon> You use AuSetIOErrorHandler() to register your own handler.
Jon> The issue you will run into, is that after your error handler
Jon> returns, libaudio will then exit(). It does this because this is a fatal
Jon> error, and the relevant state/data structures within libaudio are no
Jon> longer valid. You can edit (hack) the _AuIOError() function in
Jon> lib/audio/Alibint.c to not exit I suppose, but I do not know what problems
Jon> that would cause, or that you might later encounter if you made any
Jon> attempt to use the audio connection, or make any calls into libaudio...
Jon> Most likely the app would core later on, or upon return from
Jon> _AuIOError()...
FWIW, XEmacs supports this and XEmacs does not crash when server goes
away, and can reattach (I think) to the server if it should come
back. (I think you have to reattach manually, though.)
It's been a long while since I experimented with this, but I have been
using XEmacs with nas support for many years now.
A peek at nas.c in the xemacs sources may be helpful.
Ray
More information about the Nas
mailing list