ecore_exe: better error message when child process can not be run
authorVincent Torri <vincent dot torri at gmail dot com>
Sun, 27 Sep 2015 08:18:54 +0000 (10:18 +0200)
committerCedric BAIL <cedric@osg.samsung.com>
Tue, 13 Oct 2015 00:21:59 +0000 (17:21 -0700)
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
src/lib/ecore/ecore_exe_win32.c

index eba7913..627adeb 100644 (file)
@@ -497,7 +497,16 @@ _impl_ecore_exe_eo_base_finalize(Eo *obj, Ecore_Exe_Data *exe)
    if (!CreateProcess(shell, exe->cmd, NULL, NULL, EINA_TRUE,
                       run_pri | CREATE_SUSPENDED, NULL, NULL, &si, &pi))
      {
-        WRN("Failed to create process %s", exe->cmd);
+        char *msg;
+
+       msg = evil_last_error_get();
+       if (msg)
+         {
+            WRN("Failed to create process %s: %s", exe->cmd, msg);
+            free(msg);
+         }
+       else
+         WRN("Failed to create process %s: %ld", exe->cmd, GetLastError());
         goto error;
      }