projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CLI: Show filter expression associated to a syscall
[lttng-tools.git]
/
src
/
bin
/
lttng
/
commands
/
create.c
diff --git
a/src/bin/lttng/commands/create.c
b/src/bin/lttng/commands/create.c
index a7d327fbcada361477b71f44d025595adba67056..5027fce90dc1d8aca19f63566a7a6e4535b52489 100644
(file)
--- a/
src/bin/lttng/commands/create.c
+++ b/
src/bin/lttng/commands/create.c
@@
-15,7
+15,6
@@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#define _GNU_SOURCE
#define _LGPL_SOURCE
#include <assert.h>
#include <ctype.h>
#define _LGPL_SOURCE
#include <assert.h>
#include <ctype.h>
@@
-579,14
+578,22
@@
static int spawn_sessiond(char *pathname)
kill(getppid(), SIGTERM); /* wake parent */
exit(EXIT_FAILURE);
} else if (pid > 0) {
kill(getppid(), SIGTERM); /* wake parent */
exit(EXIT_FAILURE);
} else if (pid > 0) {
- int status;
-
/*
* In daemon mode (--daemonize), sessiond only exits when
* it's ready to accept commands.
*/
for (;;) {
/*
* In daemon mode (--daemonize), sessiond only exits when
* it's ready to accept commands.
*/
for (;;) {
- waitpid(pid, &status, 0);
+ int status;
+ pid_t wait_pid_ret = waitpid(pid, &status, 0);
+
+ if (wait_pid_ret < 0) {
+ if (errno == EINTR) {
+ continue;
+ }
+ PERROR("waitpid");
+ ret = -errno;
+ goto end;
+ }
if (WIFSIGNALED(status)) {
ERR("Session daemon was killed by signal %d",
if (WIFSIGNALED(status)) {
ERR("Session daemon was killed by signal %d",
This page took
0.027641 seconds
and
4
git commands to generate.