diff options
| author | David Gibson <david@gibson.dropbear.id.au> | 2025-12-11 14:54:35 +1100 |
|---|---|---|
| committer | Stefano Brivio <sbrivio@redhat.com> | 2025-12-12 22:20:02 +0100 |
| commit | e6612fe0a7cf4860b0d81d3b886f95273d979d1d (patch) | |
| tree | b4a814c51b6477599da1150eb5e33cfb89a39e32 /test/lib/git:/passt.top | |
| parent | d6c5b6ee1ddeafdede00a5745ee0d72fea565356 (diff) | |
| download | passt-e6612fe0a7cf4860b0d81d3b886f95273d979d1d.tar passt-e6612fe0a7cf4860b0d81d3b886f95273d979d1d.tar.gz passt-e6612fe0a7cf4860b0d81d3b886f95273d979d1d.tar.bz2 passt-e6612fe0a7cf4860b0d81d3b886f95273d979d1d.tar.lz passt-e6612fe0a7cf4860b0d81d3b886f95273d979d1d.tar.xz passt-e6612fe0a7cf4860b0d81d3b886f95273d979d1d.tar.zst passt-e6612fe0a7cf4860b0d81d3b886f95273d979d1d.zip | |
treewide: Introduce passt_exit() helper
In d0006fa78 ("treewide: use _exit() over exit()"), we replaced use of
the normal exit(3) with direct calls to _exit(2). That was because glibc
exit(3) made some unexpected futex() calls, which hit our seccomp profile.
We've since had some bugs due to missing the extra cleanup that exit(3)
implemented, for which we've added explicit cleanup calls. Specifically,
we have fflush() calls in some places to avoid leaving incomplete messages
on stdout/stderr, and in other places fsync_pcap_and_log() to avoid
leaving incomplete log or pcap files.
It's easy to forget these when adding new error paths, so instead,
implement our own passt_exit() wrapper to perform vital cleanup then call
_exit(2). This also provides an obvious place to add any additional
cleanups we discover we need in future.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'test/lib/git:/passt.top')
0 files changed, 0 insertions, 0 deletions
