diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2017-07-19 23:27:00 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2017-07-19 23:27:00 +0300 |
commit | cf87f3c78915f9cbfd900c9c34033cb924f912e7 (patch) | |
tree | 36488371ea611d2b721f87f3983a7ec64f44128e /runcap.3 | |
parent | 99d911104d7c03608398d47c74f1ce3c39bff211 (diff) | |
download | runcap-cf87f3c78915f9cbfd900c9c34033cb924f912e7.tar.gz runcap-cf87f3c78915f9cbfd900c9c34033cb924f912e7.tar.bz2 |
Invokee linemon for partial lines as well
Diffstat (limited to 'runcap.3')
-rw-r--r-- | runcap.3 | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -153,13 +153,22 @@ A pointer to the line monitor function. If set, the \fIflags\fR. .sp The line monitor function allows the caller to monitor the arrival of -each input line in the corresponding stream. Its signature is: +the new data in the corresponding stream. Its signature is: .sp .BI "void linemon(const char *" line ", size_t " size ", void *" data ) .sp where \fIline\fR is the line that has been read, \fIsize\fR is its length, and \fIdata\fR is an opaque pointer to application-specific data, supplied in the \fBsc_monarg\fR member. +.sp +The line monitor function is invoked each time a newline character is +encountered in the stream, or when the stream buffer becomes full (and, +therefore is about to be flushed into the storage file) and some +characters remain unreported. This means that, if the +\fBsc_linemon\fR function is designed to log each input line, it +should keep the state of processing (e.g. in the \fIdata\fR argument), +and concatenate the \fIline\fR parameters until +\fBline[size-1] == '\\n'\fR. .TP .B sc_monarg The value of the \fIdata\fR parameter for the \fBsc_linemon\fR |