Attached patch removes the fprintfs.

On Fri, Apr 17, 2009 at 8:01 PM, "Marco Trevisan (Treviño)"
<m...@3v1n0.net>wrote:

> Andre Dieb wrote:
> > Here's a patch for handling EBADF (Bad file descriptor) error after
> select()
> > (following the thread "random abort caused by ecore").
> >
> > It uses fcntl() for finding which fd raises EBADF. I tested the patch
> with
> > the attached program (somehow dirty but maybe shows the patch works).
> >
> > Please mail me with any suggestions.
>
> The patch seems ok, but are really needed all those "fprintf(stderr, ."?
> I guess they were there just for debugging... Please could someone
> remove them from upstream? :P
>
> --
> Treviño's World - Life and Linux
> http://www.3v1n0.net/
>
>
>
> ------------------------------------------------------------------------------
> Stay on top of everything new and different, both inside and
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> 300 plus technical and hands-on sessions. Register today.
> Use priority code J9JMT32. http://p.sf.net/sfu/p
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>



-- 
André Dieb Martins

Embedded Systems and Pervasive Computing Lab (Embedded)
Electrical Engineering Department (DEE)
Center of Electrical Engineering and Informatics (CEEI)
Federal University of Campina Grande (UFCG)

Blog: http://genuinepulse.blogspot.com/
Mail: dieb at embedded.ufcg.edu.br, andre.dieb at gmail.com
Index: src/lib/ecore/ecore_main.c
===================================================================
--- src/lib/ecore/ecore_main.c	(revision 40154)
+++ src/lib/ecore/ecore_main.c	(working copy)
@@ -422,7 +422,6 @@
 static void
 _ecore_main_fd_handlers_bads_rem(void)
 {
-   fprintf(stderr, "Removing bad fds\n");
    Ecore_Fd_Handler *fdh;
    Eina_Inlist *l;
 
@@ -434,13 +433,10 @@
 
 	if ((fcntl(fdh->fd, F_GETFD) < 0) && (errno == EBADF))
 	  {
-	     fprintf(stderr, "Found bad fd at index %d\n", fdh->fd);
 	     if (fdh->flags & ECORE_FD_ERROR)
 	       {
-		  fprintf(stderr, "Fd set for error! calling user\n");
 	         if (!fdh->func(fdh->data, fdh))
 		   {
-		     fprintf(stderr, "Fd function err returned 0, remove it\n");
 		     fdh->delete_me = 1;
 		     fd_handlers_delete_me = 1;
 		     _ecore_main_fd_handlers_cleanup();
@@ -448,7 +444,6 @@
 	       }
 	     else
 	       {
-		  fprintf(stderr, "Problematic fd found at %d! setting it for delete\n", fdh->fd);
 		  fdh->delete_me = 1;
 		  fd_handlers_delete_me = 1;
 		  _ecore_main_fd_handlers_cleanup();
@@ -472,7 +467,6 @@
 	l = l->next;
 	if (fdh->delete_me)
 	  {
-	     fprintf(stderr, "Removing fd %d\n", fdh->fd);
 	     fd_handlers = (Ecore_Fd_Handler *) eina_inlist_remove(EINA_INLIST_GET(fd_handlers),
 								   EINA_INLIST_GET(fdh));
 	     ECORE_MAGIC_SET(fdh, ECORE_MAGIC_NONE);
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to