mirror of
https://repo.or.cz/socat.git
synced 2025-07-06 13:06:33 +00:00
New option f-setpipe-sz
This commit is contained in:
parent
5ee79624b6
commit
e015aaaee6
14 changed files with 236 additions and 32 deletions
26
sycls.c
26
sycls.c
|
@ -574,6 +574,7 @@ ssize_t Write(int fd, const void *buf, size_t count) {
|
|||
return result;
|
||||
}
|
||||
|
||||
/* fcntl() without value */
|
||||
int Fcntl(int fd, int cmd) {
|
||||
int result, _errno;
|
||||
if (!diag_in_handler) diag_flush();
|
||||
|
@ -581,7 +582,8 @@ int Fcntl(int fd, int cmd) {
|
|||
Debug2("fcntl(%d, %d)", fd, cmd);
|
||||
#endif /* WITH_SYCLS */
|
||||
result = fcntl(fd, cmd);
|
||||
if (!diag_in_handler) diag_flush();
|
||||
if (!diag_in_handler)
|
||||
diag_flush();
|
||||
#if WITH_SYCLS
|
||||
_errno = errno;
|
||||
Debug1("fcntl() -> 0x%x", result);
|
||||
|
@ -590,6 +592,25 @@ int Fcntl(int fd, int cmd) {
|
|||
return result;
|
||||
}
|
||||
|
||||
/* fcntl() with int value */
|
||||
int Fcntl_i(int fd, int cmd, int arg) {
|
||||
int result, _errno;
|
||||
if (!diag_in_handler) diag_flush();
|
||||
#if WITH_SYCLS
|
||||
Debug3("fcntl(%d, %d, 0x%x)", fd, cmd, arg);
|
||||
#endif /* WITH_SYCLS */
|
||||
result = fcntl(fd, cmd, arg);
|
||||
_errno = errno;
|
||||
if (!diag_in_handler)
|
||||
diag_flush();
|
||||
#if WITH_SYCLS
|
||||
Debug1("fcntl() -> 0x%x", result);
|
||||
#endif /* WITH_SYCLS */
|
||||
errno = _errno;
|
||||
return result;
|
||||
}
|
||||
|
||||
/* fcntl() with long value */
|
||||
int Fcntl_l(int fd, int cmd, long arg) {
|
||||
int result, _errno;
|
||||
if (!diag_in_handler) diag_flush();
|
||||
|
@ -598,7 +619,8 @@ int Fcntl_l(int fd, int cmd, long arg) {
|
|||
#endif /* WITH_SYCLS */
|
||||
result = fcntl(fd, cmd, arg);
|
||||
_errno = errno;
|
||||
if (!diag_in_handler) diag_flush();
|
||||
if (!diag_in_handler)
|
||||
diag_flush();
|
||||
#if WITH_SYCLS
|
||||
Debug1("fcntl() -> 0x%x", result);
|
||||
#endif /* WITH_SYCLS */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue