From 3f2f0966f1cdcf83f6ba5d749432d83912ffdced Mon Sep 17 00:00:00 2001 From: York Jasper Niebuhr Date: Sun, 17 Aug 2025 13:11:30 +0200 Subject: [PATCH] Added example wirekit README --- wirekits/example/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wirekits/example/README.md b/wirekits/example/README.md index e69de29..4e0139d 100644 --- a/wirekits/example/README.md +++ b/wirekits/example/README.md @@ -0,0 +1,2 @@ +# Example Wire Kit +The wire kit implemented in ``main.cpp`` hooks into all entries to ``open`` and ``openat`` system calls and logs the filenames given to them. In ``wirekit_command_exit``, it prints the compiled list of all opened files. An important note is the reason to **not print** in the system call entry hooks themselves: the hosted commands use the same shell as the wire kit, by default. If you run e.g. ``vim`` but have a wire kit print in the middle of it, the output messes with ``vim``'s own control of the console. To prevent this, either accumulate all output until the command has finished executing or spawn a separate shell from within the wire kit, either when it is prepared or a command is started.