[nas] Clients die upon server death -- workaround?

Jon Trulson jon at radscan.com
Tue Jan 21 16:29:48 MST 2003


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.
>

	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.

	Not without a little hackery.  libaudio (like X11) lets you
specify your own error handler that will execute when such problems occur.
You use AuSetIOErrorHandler() to register your own handler.

	The issue you will run into, is that after your error handler
returns, libaudio will then exit().  It does this because this is a fatal
error, and the relevant state/data structures within libaudio are no
longer valid.  You can edit (hack) the _AuIOError() function in
lib/audio/Alibint.c to not exit I suppose, but I do not know what problems
that would cause, or that you might later encounter if you made any
attempt to use the audio connection, or make any calls into libaudio...
Most likely the app would core later on, or upon return from
_AuIOError()...


-- 
Jon Trulson    mailto:jon at radscan.com
ID: 1A9A2B09, FP: C23F328A721264E7 B6188192EC733962
PGP keys at http://radscan.com/~jon/PGPKeys.txt
#include <std/disclaimer.h>
You talk like a Ferengi.




More information about the Nas mailing list