[Mono-list] [PATCH] robust mono-handle-d?
Dick Porter
dick@ximian.com
08 Jun 2002 08:43:30 +0100
On Fri, 2002-06-07 at 22:28, Dennis Haney wrote:
> Dick> They're called "file descriptors" in Linux :)
>
> heh, thats the word(s) I was looking for all along ;) Shall I change
> it? If so it will be after the commit...
Yes please.
> Dick> This change shouldnt go in. The daemon shouldn't quit if it's
> Dick> still servicing clients, and it should clean up when it does
> Dick> quit.
>
> assert does not quit (and never has in any implementation I've seen),
> g_assert is implemented as:
>
> #define g_assert(expr) G_STMT_START{ \
> if (expr) { } else \
> g_log (G_LOG_DOMAIN, \
> G_LOG_LEVEL_ERROR, \
> "file %s: line %d (%s): assertion failed: (%s)", \
> __FILE__, \
> __LINE__, \
> __PRETTY_FUNCTION__, \
> #expr); }G_STMT_END
In glib, it quits due to the call to g_log() with G_LOG_LEVEL_ERROR
severity. In the standard C library, assert() calls abort().
- Dick