mirror of
https://repo.or.cz/socat.git
synced 2025-07-13 15:13:23 +00:00
Output statistics per option and SIGUSR1
This commit is contained in:
parent
2af6089436
commit
c2196d6f15
17 changed files with 304 additions and 26 deletions
|
@ -22,7 +22,7 @@ ssize_t xiowrite(xiofile_t *file, const void *buff, size_t bytes) {
|
|||
struct single *pipe;
|
||||
int _errno;
|
||||
|
||||
if (file->tag == XIO_TAG_INVALID) {
|
||||
if (file->tag == XIO_TAG_INVALID || file->tag & XIO_TAG_CLOSED) {
|
||||
Error1("xiowrite(): invalid xiofile descriptor %p", file);
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
|
@ -30,7 +30,7 @@ ssize_t xiowrite(xiofile_t *file, const void *buff, size_t bytes) {
|
|||
|
||||
if (file->tag == XIO_TAG_DUAL) {
|
||||
pipe = file->dual.stream[1];
|
||||
if (pipe->tag == XIO_TAG_INVALID) {
|
||||
if (pipe->tag == XIO_TAG_INVALID || file->tag & XIO_TAG_CLOSED) {
|
||||
Error1("xiowrite(): invalid xiofile sub descriptor %p[1]", file);
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue