From: Christian Babeux Date: Thu, 6 Dec 2012 04:37:08 +0000 (-0500) Subject: Cygwin: Force run_as_noclone on Cygwin X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=f3ff15d158dad32a9ab21f9895eaf3cc162c88c7;p=lttng-tools.git Cygwin: Force run_as_noclone on Cygwin Since clone(2) is not available on Cygwin, force the use of run_as_noclone(). --- diff --git a/src/common/runas.c b/src/common/runas.c index 3a89cc9ab..1c2663129 100644 --- a/src/common/runas.c +++ b/src/common/runas.c @@ -317,18 +317,8 @@ int run_as_noclone(int (*cmd)(void *data), void *data, uid_t uid, gid_t gid) static int run_as(int (*cmd)(void *data), void *data, uid_t uid, gid_t gid) { - if (!getenv("LTTNG_DEBUG_NOCLONE")) { - int ret; - - DBG("Using run_as_clone"); - pthread_mutex_lock(<tng_libc_state_lock); - ret = run_as_clone(cmd, data, uid, gid); - pthread_mutex_unlock(<tng_libc_state_lock); - return ret; - } else { - DBG("Using run_as_noclone"); - return run_as_noclone(cmd, data, uid, gid); - } + DBG("Using run_as_noclone"); + return run_as_noclone(cmd, data, uid, gid); } int run_as_mkdir_recursive(const char *path, mode_t mode, uid_t uid, gid_t gid)