projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
runas: use waitpid instead of wait
[lttng-tools.git]
/
librunas
/
runas.c
diff --git
a/librunas/runas.c
b/librunas/runas.c
index 0ffe52ea3792ad8f9e0e6a4d8933bff13c96d998..b3fa81469824ecc6b69979e6a64e408cbd4a5546 100644
(file)
--- a/
librunas/runas.c
+++ b/
librunas/runas.c
@@
-255,7
+255,7
@@
int run_as(int (*cmd)(void *data), void *data, uid_t uid, gid_t gid)
* Parent: wait for child to return, in which case the
* shared memory map will have been created.
*/
* Parent: wait for child to return, in which case the
* shared memory map will have been created.
*/
- pid = wait
(&status
);
+ pid = wait
pid(pid, &status, 0
);
if (pid < 0 || !WIFEXITED(status) || WEXITSTATUS(status) != 0) {
perror("wait");
ret = -1;
if (pid < 0 || !WIFEXITED(status) || WEXITSTATUS(status) != 0) {
perror("wait");
ret = -1;
@@
-302,6
+302,8
@@
int open_run_as(const char *path, int flags, mode_t mode, uid_t uid, gid_t gid)
{
struct open_data data;
{
struct open_data data;
+ DBG3("open() %s with flags %X mode %d for uid %d and gid %d",
+ path, flags, mode, uid, gid);
data.path = path;
data.flags = flags;
data.mode = mode;
data.path = path;
data.flags = flags;
data.mode = mode;
This page took
0.02315 seconds
and
4
git commands to generate.