Skip to content

Commit

Permalink
Windows: set BIG_PIPE_SIZE to max normal pipe size
Browse files Browse the repository at this point in the history
Parallel fbbea09
libzfs_core: simplify max_pipe_buffer(), return new max

Signed-off-by: Andrew Innes <andrew.c12@gmail.com>
  • Loading branch information
andrewc12 committed Sep 23, 2022
1 parent 519b6aa commit 0ba99dd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/libzfs_core/libzfs_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,15 @@
#if __FreeBSD__
#define BIG_PIPE_SIZE (64 * 1024) /* From sys/pipe.h */
#endif
#ifdef _WIN32
#define BIG_PIPE_SIZE (64 * 1024)
#endif
/*
* 64k aswell
* https://stackoverflow.com/q/33553837
* https://docs.microsoft.com/en-au/windows/win32/api/namedpipeapi/nf-namedpipeapi-transactnamedpipe
*/


static int g_fd = -1;
static pthread_mutex_t g_lock = PTHREAD_MUTEX_INITIALIZER;
Expand Down

0 comments on commit 0ba99dd

Please sign in to comment.