lorddrew pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=792acc9f9eaf8587490ea7cc5a984689f7283502
commit 792acc9f9eaf8587490ea7cc5a984689f7283502 Author: Andrii Kroitor <an.kroi...@samsung.com> Date: Thu Dec 22 18:49:27 2016 +0200 ecore_exe: do not try to send 0 bytes Summary: This action is meaningless when communicating with child process. Reviewers: barbieri Reviewed By: barbieri Subscribers: jpeg, vtorri, cedric, raster Differential Revision: https://phab.enlightenment.org/D4510 --- src/lib/ecore/ecore_exe.c | 2 ++ src/lib/ecore/ecore_exe_win32.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/ecore/ecore_exe.c b/src/lib/ecore/ecore_exe.c index 6cf7e59..dcf9cea 100644 --- a/src/lib/ecore/ecore_exe.c +++ b/src/lib/ecore/ecore_exe.c @@ -126,6 +126,8 @@ ecore_exe_send(Ecore_Exe *obj, if (!efl_isa(obj, MY_CLASS)) return EINA_FALSE; + EINA_SAFETY_ON_TRUE_RETURN_VAL(size == 0, EINA_TRUE); + if (exe->close_stdin) { ERR("Ecore_Exe %p stdin is closed! Cannot send %d bytes from %p", diff --git a/src/lib/ecore/ecore_exe_win32.c b/src/lib/ecore/ecore_exe_win32.c index 6479985..33854f8 100644 --- a/src/lib/ecore/ecore_exe_win32.c +++ b/src/lib/ecore/ecore_exe_win32.c @@ -560,7 +560,7 @@ _impl_ecore_exe_send(Ecore_Exe *obj, BOOL res; res = WriteFile(exe->pipe_write.child_pipe_x, data, size, &num_exe, NULL); - if (size && !res || num_exe == 0) + if (!res || num_exe == 0) { ERR("Ecore_Exe %p stdin is closed! Cannot send %d bytes from %p", obj, size, data); --