Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2011-11-23 22:56:57 +0400
committerChristopher Faylor <me@cgf.cx>2011-11-23 22:56:57 +0400
commit9f65451e3e9b5a3a5c7c35343daee24a09d1d3a2 (patch)
tree778e4c4965103ae07c865747fa27c0f7ae419f88 /winsup/cygwin/sigproc.cc
parentcc07096c5c951629a3dad84b5f37d4d3ce3af8cc (diff)
* 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/sigproc.cc')
-rw-r--r--winsup/cygwin/sigproc.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index 8d3113986..43b329373 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -464,12 +464,14 @@ void __stdcall
sigproc_init ()
{
char char_sa_buf[1024];
- PSECURITY_ATTRIBUTES sa_buf = sec_user_nih ((PSECURITY_ATTRIBUTES) char_sa_buf, cygheap->user.sid());
- for (int i = 5;
- i > 0 && !CreatePipe (&my_readsig, &my_sendsig, sa_buf, 0);
- i--)
- if (i == 1)
+ PSECURITY_ATTRIBUTES sa = sec_user_nih ((PSECURITY_ATTRIBUTES) char_sa_buf, cygheap->user.sid());
+ DWORD err = fhandler_pipe::create (sa, &my_readsig, &my_sendsig,
+ sizeof (sigpacket), NULL, 0);
+ if (err)
+ {
+ SetLastError (err);
api_fatal ("couldn't create signal pipe, %E");
+ }
ProtectHandle (my_readsig);
myself->sendsig = my_sendsig;
/* sync_proc_subproc is used by proc_subproc. It serializes