X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Frunas.c;h=86db9b8682c343efaee59a08bee72123fc518d60;hb=d27c42b8fcc92f3fc776fd1b821d2572bce01c04;hp=07912a7d68bf7ce97cf7ba765194fd66e28334c8;hpb=059e1d3d3268391d73bb0dc733629eb8edfeb1ed;p=lttng-tools.git diff --git a/src/common/runas.c b/src/common/runas.c index 07912a7d6..86db9b868 100644 --- a/src/common/runas.c +++ b/src/common/runas.c @@ -28,9 +28,11 @@ #include #include #include -#include +#include #include +#include +#include #include "runas.h" @@ -235,9 +237,8 @@ int run_as(int (*cmd)(void *data), void *data, uid_t uid, gid_t gid) * Pointing to the middle of the stack to support architectures * where the stack grows up (HPPA). */ - pid = clone(child_run_as, child_stack + (RUNAS_CHILD_STACK_SIZE / 2), - CLONE_FILES | SIGCHLD, - &run_as_data, NULL); + pid = lttng_clone_files(child_run_as, child_stack + (RUNAS_CHILD_STACK_SIZE / 2), + &run_as_data); if (pid < 0) { perror("clone"); ret = pid;