* Dhaval Giani <[email protected]> [2010-06-01 17:27:18]:

> 
> 
> The autogenerated code fromt the lexer was calling exit on a
> fatal error. Do not do that. Instead log the message.
> 
> This is not ready to be merged yet since we still need to decide
> what the correct action should be.
> 
> It also introduces a new warning, which will be fixed in due course.
> 
> Not-Yet-Signed-off-by: Dhaval Giani <[email protected]>
> 
> Index: libcg/src/lex.l
> ===================================================================
> --- libcg.orig/src/lex.l
> +++ libcg/src/lex.l
> @@ -1,4 +1,4 @@
> -/*
> +/*u

Woa!

>   * Copyright IBM Corporation. 2007
>   *
>   * Authors:  Balbir Singh <[email protected]>
> @@ -13,9 +13,12 @@
> 
>  %{
>  #include <string.h>
> +#include <libcgroup.h>
> +#include <libcgroup-internal.h>
>  #include "parse.h"
>  int line_no = 1;
> 
> +#define YY_FATAL_ERROR(msg) cgroup_dbg(%s)

FATAL ERRORs are converted to debug messages? How about at-least a
fprintf on stderr? Given that we are a library, we might need to
log the message to syslog. Apart from that we should be setting
cgroup_errno or at-least an error to indicate something went bad
internally.

>  %}
> 
>  %%
> 
> 

-- 
        Three Cheers,
        Balbir

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Libcg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to