AgeCommit message (Collapse)AuthorFiles
2020-01-30Optionally store the captured stream in a file.HEADv1.3masterSergey Poznyakoff7
* runcap.3: Document the sc_storfd member and the RCF_STDOUT_STORFD and RCF_STDERR_STORFD flags. * runcap.c (stream_capture_init): Rewrite. (stream_capture_reset): Don't close sc_storfd if RCF_SC_STORFD flag is set. (runcap_start): Redirect output to the corresponding sc_storfd descriptor if so requested. * runcap.h (stream_capture): Replace sc_nocap with sc_flags. (RCF_SC_SIZE,RCF_SC_LINEMON) (RCF_SC_NOCAP,RCF_SC_STORFD): New stream-specific constants. (RCF_SC_TO_FLAG,RCF_FLAG_TO_SC): New macros. Rewrite existing RCF_STDOUT_* and RCF_STDERR_* flags using RCF_SC_TO_FLAG. (RCF_STDOUT_STORFD,RCF_STDERR_STORFD): New flags. * t/ New test case. * t/ Add new test. * t/ Likewise. * t/rt.c: New option -o: send output to a file.
2020-01-30Fix typo in the manpageSergey Poznyakoff1
2020-01-30Update copyright yearsSergey Poznyakoff28
2019-08-17Implement runcap_read functionv1.2Sergey Poznyakoff10
* (RUNCAP_SRC): Add read.c * read.c: New file * runcap.h (runcap_read): New proto. * t/rt: Expand read request to include a flag for selecting * t/ New file. * t/ New file * t/ Remove. * t/ Remove. * t/ (TESTSUITE_AT): Add new test. Merge two nocap tests to one. * t/ Likewise.
2019-08-16Set version number for the standalone library from git describeSergey Poznyakoff2
2019-08-16Explicitly indicate EOF when sc_linemon is initialized.Sergey Poznyakoff3
* runcap.3: Document changes. * runcap.c (stream_capture_get): Indicate EOF explicitly by calling sc_linemon function with 0 as line length. * t/rt.c (linemon): Update to handle this case.
2019-08-16Run line monitor functions with stream capturing disabledSergey Poznyakoff11
* runcap.3: Document changes. * runcap.c (stream_capture_init): Change signature. Change to static. (stream_capture_free): Change to static. (stream_capture_get): Special handling for "no capture" streams with line monitors. * runcap.h (stream_capture): New member: sc_nocap. (RCF_STDOUT_NOCAP) (RCF_STDERR_NOCAP): New flags. * t/ Add new tests. * t/ Likewise. * t/ Add copyright header. * t/ New test. * t/ New include file. * t/ New test. * t/ New test. * t/rt.c: New option: -N
2019-08-14Update READMEv1.1Sergey Poznyakoff1
2019-08-13Pass the last line to the monitor even if it is not terminated with a newlineSergey Poznyakoff4
* runcap.c (stream_capture_get): Consume the last line even if it is not terminated with a newline. * t/ New test case. * t/ Add new test. * t/ Include new test.
2018-06-01Fix typo in READMEv1.0Sergey Poznyakoff1
2017-12-01BugfixesSergey Poznyakoff3
* runcap.3: Update docs. * runcap.c (stream_capture_get,stream_capture_put) (runcap_loop): Handle EINTR. * README: New file.
2017-09-27Avoid closing stdin.Sergey Poznyakoff3
When given the RCF_STDIN flag, runcap_init failed to initialize rc_cap[RUNCAP_STDIN].sc_storfd. It remained initialized to 0 which eventually led to stdin being inadvertenlty closed by runcap_free. * runcap.c (stream_capture_alloc): Merge with stream_capture_init. All callers updated. (runcap_init): Initialize rc_cap[RUNCAP_STDIN].sc_storfd to -1 to prevent it from being closed. * t/ Set 5 seconds timeout. * t/ Likewise.
2017-08-20Use the RUNCAP_BUILD environment variable to determine build type during ↵Sergey Poznyakoff1
2017-08-19BugfixesSergey Poznyakoff4
2017-08-19Rewrite testsuite in autotest. Fix distcheckSergey Poznyakoff21
2017-08-19Switch to autotoolsSergey Poznyakoff11
* .gitignore: Update. * Makefile: Remove. * New file. * New file. * New file. * New file. * New file. * runcap.m4: New file. * t/Makefile: Remove. * t/ New file. * t/testsuite: Don't use relative directory addressing.
2017-07-24Improve manpageSergey Poznyakoff1
2017-07-21Speed-up pipe readsSergey Poznyakoff1
2017-07-21Fix tell/seek operationsSergey Poznyakoff8
* Makefile (clean): descend into t as well. * t/Makefile (clean): New goal. * runcap.h (runcap_seek): Return off_t. * seek.c (runcap_seek): Change return value. Fix operation. * tell.c (runcap_tell): Bugfix. * t/rt.c: New option -r for testing seek. * t/08seek.t: New testcase. * t/09seek.t: New testcase.
2017-07-20Minor changesSergey Poznyakoff2
* Makefile: Add the "clean" rule. * runcap.c (runcap): Rewind captured streams before return on success.
2017-07-20Fix some wording in the manpageSergey Poznyakoff1
2017-07-19Invokee linemon for partial lines as wellSergey Poznyakoff5
2017-07-19Include the manpage; improve make distcheckSergey Poznyakoff8
2017-07-19Rename struct filecapture to stream_capture; portability fixesSergey Poznyakoff9
2017-07-19Implement make dist; add new testSergey Poznyakoff4
* Makefile (distdir,dist,distcheck): New goals. * t/Makefile (dist): New goal. * t/06mon.t: New file.
2017-07-18Minor changeSergey Poznyakoff5
* runcap.h (filecapture) <fc_linestart>: Rename to fc_cur. All uses updated. * runcap.c (filecapture_put): Use fc_cur as current pointer and fc_level as the limit, for consistency. (runcap_init): Initialize fc_cur.
2017-07-18Add missing API calls, provide testsuiteSergey Poznyakoff19
2017-07-17Minor changeSergey Poznyakoff1
2017-07-17Write a test toolSergey Poznyakoff2
* runcap.c (timeval_after): Fix typo. * t/rt.c: New file.
2017-07-17Initial commitSergey Poznyakoff3

Return to:

Send suggestions and report system problems to the System administrator.