Enlightenment CVS committal Author : raster Project : e17 Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore Modified Files: ecore_exe.c Log Message: exe pipe example and other exe (no pipe) example. :) =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore/ecore_exe.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -3 -r1.22 -r1.23 --- ecore_exe.c 11 Dec 2005 00:11:12 -0000 1.22 +++ ecore_exe.c 11 Dec 2005 06:52:07 -0000 1.23 @@ -242,7 +242,7 @@ exe->pid = pid; exe->flags = flags; exe->data = (void *)data; - exe->cmd = exe_cmd; /* FIXME: should calloc and cpy. */ + exe->cmd = strdup(exe_cmd); if (flags & ECORE_EXE_PIPE_READ) { exe->child_fd_read = readPipe[0]; @@ -254,6 +254,7 @@ if (flags & ECORE_EXE_PIPE_WRITE) { exe->child_fd_write = writePipe[1]; + fcntl(exe->child_fd_write, F_SETFL, O_NONBLOCK); /* FIXME: Check for -1 then errno. */ exe->write_fd_handler = ecore_main_fd_handler_add(exe->child_fd_write, ECORE_FD_WRITE, _ecore_exe_data_write_handler, exe, NULL, NULL); @@ -639,7 +640,8 @@ if (exe->read_data_buf) free(exe->read_data_buf); if (exe->flags & ECORE_EXE_PIPE_READ) close(exe->child_fd_read); /* FIXME: Check for -1 then errno. */ if (exe->flags & ECORE_EXE_PIPE_WRITE) close(exe->child_fd_write); /* FIXME: Check for -1 then errno. */ - + if (exe->cmd) free(exe->cmd); + exes = _ecore_list2_remove(exes, exe); ECORE_MAGIC_SET(exe, ECORE_MAGIC_NONE); if (exe->tag) free(exe->tag); ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs