AUPARSE_FLUSH_FEED(3)
π AUPARSE_FLUSH_FEED β¨
okay bestie, welcome to the auparse_flush_feed(3) page β it's part of the Linux Audit API and it's genuinely one of those little functions that saves your whole pipeline, no cap π«Ά
πΈ NAME πΈ
auparse_flush_feed β flush any unconsumed feed data through the parser, fr fr
β¨ SYNOPSIS β¨
#include <auparse.h>
int auparse_flush_feed(auparse_state_t *au);"
π¦ DESCRIPTION π¦
okay so here's the tea β β you call auparse_flush_feed when you're done feeding input data, and it signals "that's it, that's the whole feed" to the parsing system and flushes any pending parse data on through. it's giving closing time at the club π
the way that you must call auparse_add_callback() before flushing feed data, because complete events need a consumer β no callback means nobody's catching the events and that's just sad π
malformed feed records? rejected, periodt. they do not get passed to the callback, nope, not today π
and if malformed records are found, parsing continues for the rest of the available feed data before auparse_flush_feed returns an error. so it doesn't rage-quit halfway, it finishes the job first π₯
π RETURN VALUE π
- returns
-1if an error occurs; otherwise0for success, slay β - when
-1comes back,errnois set to indicate the error - the value of
errnois meaningful only after an error return β callers should not assume it is cleared after a successful call π - applications that may run with
libauparsefrom beforeaudit-4.1.5should seterrnoto0before callingauparse_flush_feed - if
auparse_flush_feedreturns-1anderrnois still0, the runtime library is using the older error behavior and did not seterrno - clearing
errnofirst avoids treating a pre-existing value as if it were set byauparse_flush_feedβ like, don't blame the function for anerrnoit never touched, that's not fair bestie π₯Ί
β οΈ seriously though, thaterrno-clearing thing is not a vibe check you want to fail. set it to0first if you might be on oldlibauparse. it's lowkey important.
π ERRORS π
EINVALβ the parser state is invalid, the parser was not initialized withAUSOURCE_FEED, or no callback has been registered. basically something's missing and the parser is like "who? what? where?" πENOMEMβ memory allocation failed while parsing feed data. the malloc said "no β€οΈ"EBADMSGβ a malformed feed record was found. the malformed record was rejected and was not passed to the callback. parsing continues for the rest of the available feed data before this error is returned. so it still eats the whole plate before telling you one bite was weird πEIOβ an internal parser failure occurred without a more specific error code. it's giving mystery β¨ and not the fun kind
π SEE ALSO π
π AUTHOR π
John Dennis β icon behavior, honestly
okay bestie that's the whole page!! π this one's from the Linux Audit API, brought to you by Red Hat, dated Apr 2016, and it lives at AUPARSE_FLUSH_FEED(3) β go flush that feed and slay β¨π¦π
π¦ where this page comes from
- arch rolling: audit 4.2.1-1 Β· GPL-2.0-or-later AND LGPL-2.0-or-later
- centos-stream 10: audit-libs-devel 4.2.1-3.el10 Β· LGPL-2.0-or-later
- fedora 43: audit-libs-devel 4.2.1-1.fc43 Β· LGPL-2.0-or-later
- fedora 43: audit-libs-devel 4.2.1-1.fc43 Β· LGPL-2.0-or-later
- fedora 44: audit-libs-devel 4.2.1-1.fc44 Β· LGPL-2.0-or-later
- fedora 44: audit-libs-devel 4.2.1-1.fc44 Β· LGPL-2.0-or-later
- nixpkgs unstable: audit 4.2.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms