summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/pipe.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2011-11-23 18:56:57 +0000
committerChristopher Faylor <me@cgf.cx>2011-11-23 18:56:57 +0000
commit9f65451e3e9b5a3a5c7c35343daee24a09d1d3a2 (patch)
tree778e4c4965103ae07c865747fa27c0f7ae419f88 /winsup/cygwin/pipe.cc
parentcc07096c5c951629a3dad84b5f37d4d3ce3af8cc (diff)
downloadcygnal-9f65451e3e9b5a3a5c7c35343daee24a09d1d3a2.tar.gz
cygnal-9f65451e3e9b5a3a5c7c35343daee24a09d1d3a2.tar.bz2
cygnal-9f65451e3e9b5a3a5c7c35343daee24a09d1d3a2.zip
* fhandler.h (fhandler_pipe::create): Rename from the misnamed
"create_selectable". Change return to DWORD. (fhandler_pty_common::pipesize): New constant. * fhandler_fifo.cc (fhandler_fifo::fhandler_fifo): Reflect create_selectable name change. * miscfuncs.cc (CreatePipeOverlapped): Ditto. * pipe.cc (fhandler_pipe::create): Ditto. (fhandler_pipe::create): Rename from the misnamed "create_selectable". Return DWORD. Only set pipe size to default when it is passed in as zero. * fhandler_tty.cc (fhandler_pty_master::setup): Ditto. Use fhandler_pty_common::pipesize rather than a raw constant. * tty.cc (tty::not_allocated): Ditto. * sigproc.cc (sigproc_init): Use create_selectable to create the signal pipe to get a more appropriate message based pipe.
Diffstat (limited to 'winsup/cygwin/pipe.cc')
-rw-r--r--winsup/cygwin/pipe.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/winsup/cygwin/pipe.cc b/winsup/cygwin/pipe.cc
index 7bbe96fab..60b59ff62 100644
--- a/winsup/cygwin/pipe.cc
+++ b/winsup/cygwin/pipe.cc
@@ -196,9 +196,9 @@ fhandler_pipe::dup (fhandler_base *child, int flags)
which is used to implement select and nonblocking writes.
Note that the return value is either 0 or GetLastError,
unlike CreatePipe, which returns a bool for success or failure. */
-int
-fhandler_pipe::create_selectable (LPSECURITY_ATTRIBUTES sa_ptr, HANDLE *r,
- HANDLE *w, DWORD psize, const char *name, DWORD open_mode)
+DWORD
+fhandler_pipe::create (LPSECURITY_ATTRIBUTES sa_ptr, PHANDLE r, PHANDLE w,
+ DWORD psize, const char *name, DWORD open_mode)
{
/* Default to error. */
if (r)
@@ -207,7 +207,7 @@ fhandler_pipe::create_selectable (LPSECURITY_ATTRIBUTES sa_ptr, HANDLE *r,
*w = NULL;
/* Ensure that there is enough pipe buffer space for atomic writes. */
- if (psize < DEFAULT_PIPEBUFSIZE)
+ if (!psize)
psize = DEFAULT_PIPEBUFSIZE;
char pipename[MAX_PATH];
@@ -327,7 +327,7 @@ fhandler_pipe::create (fhandler_pipe *fhs[2], unsigned psize, int mode)
SECURITY_ATTRIBUTES *sa = sec_none_cloexec (mode);
int res = -1;
- int ret = create_selectable (sa, &r, &w, psize, NULL, FILE_FLAG_OVERLAPPED);
+ int ret = create (sa, &r, &w, psize, NULL, FILE_FLAG_OVERLAPPED);
if (ret)
__seterrno_from_win_error (ret);
else if ((fhs[0] = (fhandler_pipe *) build_fh_dev (*piper_dev)) == NULL)