aboutsummaryrefslogtreecommitdiffstats
path: root/TraceScreen.c
diff options
context:
space:
mode:
Diffstat (limited to 'TraceScreen.c')
-rw-r--r--TraceScreen.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/TraceScreen.c b/TraceScreen.c
index abef712..91f71ae 100644
--- a/TraceScreen.c
+++ b/TraceScreen.c
@@ -101,14 +101,15 @@ bool TraceScreen_forkTracer(TraceScreen* this) {
int ok = fcntl(this->fdpair[1], F_SETFL, O_NONBLOCK);
if (ok != -1) {
xSnprintf(buffer, sizeof(buffer), "%d", this->super.process->pid);
- execlp("strace", "strace", "-p", buffer, NULL);
+ execlp("strace", "strace", "-s", "512", "-p", buffer, NULL);
}
const char* message = "Could not execute 'strace'. Please make sure it is available in your $PATH.";
ssize_t written = write(this->fdpair[1], message, strlen(message));
(void) written;
exit(1);
}
- fcntl(this->fdpair[0], F_SETFL, O_NONBLOCK);
+ int ok = fcntl(this->fdpair[0], F_SETFL, O_NONBLOCK);
+ if (ok == -1) return false;
this->strace = fdopen(this->fdpair[0], "r");
this->fd_strace = fileno(this->strace);
return true;

© 2014-2024 Faster IT GmbH | imprint | privacy policy