]> sourceware.org Git - newlib-cygwin.git/commit
Cygwin: FIFO: fix clone
authorKen Brown <kbrown@cornell.edu>
Sun, 14 Apr 2019 19:16:02 +0000 (19:16 +0000)
committerCorinna Vinschen <corinna@vinschen.de>
Tue, 16 Apr 2019 10:54:43 +0000 (12:54 +0200)
commit7b28776d3fe6909abb10273af2a3bfdca6351292
tree01df3c87df612e89fae14ef7171ab142b981074e
parentc5bc7a806521ce8d72f8ffc1c5c4c5efac87606f
Cygwin: FIFO: fix clone

After copyto is called, make the new fhandler's pipe_name point to the
new fhandler's pipe_name_buf, which is a *copy* of the old fhandler's
pipe_name_buf.  Previously, get_pipe_name would return the wrong
result after a clone/dup, causing create_pipe_instance and open_pipe
to fail.

Also, stop the listen_client thread when cloning.  Otherwise the
thread can keep accepting connections that the cloned fhandler won't
know about.

Do this via a new method fhandler_fifo::stop_listen_client, extracted
from fhandler_fifo::close.
winsup/cygwin/fhandler.h
winsup/cygwin/fhandler_fifo.cc
This page took 0.027972 seconds and 5 git commands to generate.