From: Dhaval Giani Date: Fri, 4 Jun 2010 11:30:58 +0000 (+0200) Subject: libcgroup: Do not call exit from within the main library X-Git-Tag: v0.36.2~2^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=974948a8753c9c79c6901ff795c9829d968c60a6;p=thirdparty%2Flibcgroup.git libcgroup: Do not call exit from within the main library The autogenerated code fromt the lexer was calling exit on a fatal error. Do not do that. Instead log the message. While it is still not clear if this is the correct response for YY_FATAL_ERROR, we need to gracefully handle errors, and since this is a path which is very rarely hit, this is still a low risk change and so we will merge it. Signed-off-by: Dhaval Giani --- diff --git a/src/lex.l b/src/lex.l index 6291b553..2f4e3132 100644 --- a/src/lex.l +++ b/src/lex.l @@ -13,9 +13,12 @@ %{ #include +#include +#include #include "parse.h" int line_no = 1; +#define YY_FATAL_ERROR(msg) cgroup_dbg(%s) %} %%