[Pkg-e-commits] [SCM] Core abstraction layer for enlightenment DR 0.17 branch, upstream-vcs, updated. d6ccd8186518c58c26c1b20e1ea5de408340bb80
raster
raster at alioth.debian.org
Mon Mar 10 15:24:37 UTC 2008
The following commit has been merged in the upstream-vcs branch:
commit d6ccd8186518c58c26c1b20e1ea5de408340bb80
Author: raster <raster>
Date: Mon Mar 10 06:44:32 2008 +0000
allow to have sub-rpocessed controlled by parent if parent dies/segvs/kill
-9'd , ecore_exe'd children die too.
diff --git a/src/lib/ecore/Ecore.h b/src/lib/ecore/Ecore.h
index f4e517b..834f4c2 100644
--- a/src/lib/ecore/Ecore.h
+++ b/src/lib/ecore/Ecore.h
@@ -95,7 +95,8 @@ extern "C" {
ECORE_EXE_PIPE_ERROR_LINE_BUFFERED = 16, /**< Errors are buffered until a newline and delivered 1 event per line */
ECORE_EXE_PIPE_AUTO = 32, /**< stdout and stderr are buffered automatically */
ECORE_EXE_RESPAWN = 64, /**< FIXME: Exe is restarted if it dies */
- ECORE_EXE_USE_SH = 128 /**< Use /bin/sh to run the command. */
+ ECORE_EXE_USE_SH = 128, /**< Use /bin/sh to run the command. */
+ ECORE_EXE_NOT_LEADER = 256 /**< Do not use setsid() to have the executed process be its own session leader */
};
typedef enum _Ecore_Exe_Flags Ecore_Exe_Flags;
diff --git a/src/lib/ecore/ecore_exe.c b/src/lib/ecore/ecore_exe.c
index ac0c583..0517e35 100644
--- a/src/lib/ecore/ecore_exe.c
+++ b/src/lib/ecore/ecore_exe.c
@@ -1296,7 +1296,7 @@ _ecore_exe_exec_it(const char *exe_cmd, Ecore_Exe_Flags flags)
}
}
- setsid();
+ if (!(flags & ECORE_EXE_NOT_LEADER)) setsid();
if ((flags & ECORE_EXE_USE_SH))
{
errno = 0;
diff --git a/src/lib/ecore/ecore_private.h b/src/lib/ecore/ecore_private.h
index e8eeb47..289c2e0 100644
--- a/src/lib/ecore/ecore_private.h
+++ b/src/lib/ecore/ecore_private.h
@@ -159,7 +159,8 @@ enum _Ecore_Exe_Flags
ECORE_EXE_PIPE_ERROR_LINE_BUFFERED = 16,
ECORE_EXE_PIPE_AUTO = 32,
ECORE_EXE_RESPAWN = 64,
- ECORE_EXE_USE_SH = 128
+ ECORE_EXE_USE_SH = 128,
+ ECORE_EXE_NOT_LEADER = 256
/* FIXME: Getting respawn to work
*
* There is no way that we can do anything about the internal state info of
--
Core abstraction layer for enlightenment DR 0.17
More information about the Pkg-e-commits
mailing list