From: Mike McCormack <mj.mccormack@samsung.com>
authordiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 24 Jan 2011 01:59:09 +0000 (01:59 +0000)
committerdiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 24 Jan 2011 01:59:09 +0000 (01:59 +0000)
ecore_config code may end up closing stdin, due to assuming 0 is a valid fd.

I know this code is deprecated, and it's being kept around "for reference".

Either:
A) this bug should still be fixed so bad code is not copied elsewhere

OR

B) ecore_config should be deleted so bad code is not copied elsewhere

thanks,

Mike

git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@56275 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/ecore_config/ecore_config.c

index ddfc64f..d8b587e 100644 (file)
@@ -1636,7 +1636,7 @@ ecore_config_init_global(const char *name)
        snprintf(buf, PATH_MAX, "%s/.ecore/%s/.global", p, name);
        global = creat(buf, S_IRWXU);
 
-       if (global)
+       if (global >= 0)
           close(global);
 
        free(buf);