summaryrefslogtreecommitdiff
path: root/src/defs.h
diff options
context:
space:
mode:
authorSahil Siddiq <icegambit91@gmail.com>2023-03-20 11:10:56 +0530
committerDmitry V. Levin <ldv@strace.io>2023-04-03 19:13:29 +0000
commitac1d1e25d8d45b8e74ec4cde0f06a7b1df621304 (patch)
tree0b2bffbdbdc2e14ed31c4aa8f8a77e6fb3ebcaca /src/defs.h
parentd3b97fce7229fa8db7a87e03fcd445b8f97fe743 (diff)
downloadstrace-ac1d1e25d8d45b8e74ec4cde0f06a7b1df621304.tar.gz
Introduce -l/--syscall-limit options
Add new options to detach strace after capturing the specified number of syscalls. * src/defs.h (syscall_limit): New variable declaration. * src/strace.c (syscall_limit): New variable. (usage): Mention new options. (init): Handle them. (next_event): Break the event loop when syscall_limit == 0. * src/syscall.c (syscall_exiting_trace): Update syscall_limit. Signed-off-by: Sahil Siddiq <icegambit91@gmail.com> Resolves: https://github.com/strace/strace/issues/179
Diffstat (limited to 'src/defs.h')
-rw-r--r--src/defs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/defs.h b/src/defs.h
index 6c93d8460..245958772 100644
--- a/src/defs.h
+++ b/src/defs.h
@@ -513,6 +513,7 @@ extern int Tflag_scale;
extern int Tflag_width;
extern bool iflag;
extern bool count_wallclock;
+extern long long syscall_limit;
struct path_set_item {
const char *path;