mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-09 23:34:51 +01:00
fatrace: we need to flush every line when using a pipe.
/sbin/fatrace -c -t -f W | grep "/etc/" produced no output until internal printf buffer full and that is not so useful.
This commit is contained in:
parent
96aa7c4cab
commit
61fbbfe3d8
1 changed files with 12 additions and 0 deletions
12
fatrace/patches/002-fflush.patch
Normal file
12
fatrace/patches/002-fflush.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff --git a/fatrace.c b/fatrace.c
|
||||
index b7d1560..6179272 100644
|
||||
--- a/fatrace.c
|
||||
+++ b/fatrace.c
|
||||
@@ -149,6 +149,7 @@ print_event(const struct fanotify_event_metadata *data,
|
||||
printf ("%li.%06li ", event_time->tv_sec, event_time->tv_usec);
|
||||
}
|
||||
printf ("%s(%i): %s %s\n", procname, data->pid, mask2str (data->mask), pathname);
|
||||
+ fflush(stdout);
|
||||
}
|
||||
|
||||
/**
|
||||
Loading…
Add table
Reference in a new issue