geLog
@@ -1,3 +1,7 @@
+2015-10-06 Ken Brown
+
+ * faq-using.xml (faq.using.same-with-permissions): New entry.
+
2015-09-07 Brian Inglis
* faq-using.xml (faq.using.man): Replace makewhatis with mandb.
diff --git a/winsup/doc/faq-using.xml b/winsup/doc/faq-using.xml
index 76
On 10/20/2015 3:25 PM, Corinna Vinschen wrote:
Hi Ken,
On Oct 6 16:41, Ken Brown wrote:
There have been several recent threads on the cygwin list stemming from the
permissions change in 1.7.34. I've pointed people to the FAQ about ssh
public key authentication, which is not the first
cygwin1.dll doesn't build on x86 after the last commit (eed35ef). The
trivial patch attached fixes it.
Ken
From 1cd61c54994b2ba6c6ec1d1f8f1249f5f8fd4af3 Mon Sep 17 00:00:00 2001
From: Ken Brown
Date: Fri, 11 Dec 2015 17:08:28 -0500
Subject: [PATCH] Fix regparm attribute of fhandler
o be restored before one can rebuild.
The attached patch fixes both problems.
Ken
From 71c16ecc3126a41ae41cbf354428c64282952951 Mon Sep 17 00:00:00 2001
From: Ken Brown
Date: Sun, 5 Jun 2016 12:58:22 -0400
Subject: [PATCH] Allow 'make distclean' to clean winsup/cygwin
MIME-Version
e right feature-test macro in the patch. It's
marked XSI by Posix, but using __XSI_VISIBLE didn't work.
Ken
P.S. Is cygwin-patches OK for this sort of thing, or should I have sent
it to the newlib list?
From 91ed7816e771a78170555db246e0e35dc6d2ca3e Mon Sep 17 00:00:00 2001
From: Ke
On 6/9/2016 5:00 AM, Corinna Vinschen wrote:
Hi Ken,
On Jun 8 17:18, Ken Brown wrote:
According to Posix, including should bring in the declaration of
crypt. The glibc and FreeBSD headers are consistent with this, but Cygwin's
aren't.
$ cat test.c
#include
int
main (void)
{
t, but Cygwin's crypt.h simply has 'char
*block'. FreeBSD and glibc also use 'char *block', so I did the same.
Or would you rather follow Posix here?
Thanks a lot and sorry again,
No problem. Revised patch attached.
Ken
From e6ab8bbf44d1042df3dd9e989967a649523d193d
The attached patch is the one promised in
https://www.cygwin.com/ml/cygwin/2016-08/msg00431.html
Ken
From e46d88d4141737f7f75ec1fb60b6e404f598a965 Mon Sep 17 00:00:00 2001
From: Ken Brown
Date: Tue, 23 Aug 2016 13:24:49 -0400
Subject: [PATCH] Clarify Cygwin's support for Win32 paths
0
This test was done, obviously, on a system with the obcaseinsensitive
registry key set to 0, and with /tmp/a non-existent. I also tested with
the registry key set to 1, with the expected results.
Ken
From 04b507edbfbbaade6ef19ba9302ac9a758886995 Mon Sep 17 00:00:00 2001
From: Ken Brown
Dat
From 45060307b1e8e06a522cd95e9567155e98dda832 Mon Sep 17 00:00:00 2001
From: Ken Brown
Date: Sun, 6 Aug 2017 17:40:43 -0400
Subject: [PATCH] Define sigsetjmp/siglongjmp only if __POSIX_VISIBLE
---
newlib/libc/include/machine/setjmp.h | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/newlib
On 8/6/2017 5:46 PM, Ken Brown wrote:
The attached patch fixes the issue reported here:
https://cygwin.com/ml/cygwin/2017-08/msg00060.html
I'm not sure if I was correct in including RTEMS or if this should have
been Cygwin only. If the former, I probably should have sent this to
file or directory
bar
Ken
From 23edb25c9c0b6a21aefb10372db945807b2b8e3f Mon Sep 17 00:00:00 2001
From: Ken Brown
Date: Thu, 17 Aug 2017 09:12:15 -0400
Subject: [PATCH] cygwin: Implement renameat2
Define the RENAME_* flags in as defined on Linux in
, but support only RENAME_NOREPLACE.
---
newlib
x27;t see how we can ever do
RENAME_WHITEOUT).
Thanks for the feedback. Revised patch attached.
From 136b0dfd53e147002e134048658d20f452402c9f Mon Sep 17 00:00:00 2001
From: Ken Brown
Date: Thu, 17 Aug 2017 09:12:15 -0400
Subject: [PATCH] cygwin: Implement renameat2
Define the RENAME_NOREPLACE
Hi Corinna,
On 8/18/2017 11:15 AM, Corinna Vinschen wrote:
Hi Ken,
On Aug 18 09:21, Ken Brown wrote:
Linux has a system call 'renameat2' which is like renameat but has an
extra 'flags' argument. In particular, one can pass the
RENAME_NOREPLACE flag to cause the rename to
Hi Corinna,
On 8/19/2017 5:57 AM, Corinna Vinschen wrote:
Hi Ken,
On Aug 18 18:24, Ken Brown wrote:
Thanks for the improvements! A revised patch is attached. As you'll see, I
still found a few places where I thought I needed to explicitly set the
errno to EEXIST. Let me know if a
On 8/19/2017 12:37 PM, Corinna Vinschen wrote:
> Oh, one more thing. This is a question to Yaakov, too.
>
> diff --git a/newlib/libc/include/stdio.h b/newlib/libc/include/stdio.h
> index 5d8cb1092..331a1cf07 100644
> --- a/newlib/libc/include/stdio.h
> +++ b/newlib/libc/include/stdio.h
> @@ -384,
On 8/19/2017 12:28 PM, Corinna Vinschen wrote:
Doc changes coming? :)
Attached.
Ken
From 0704541f1d29e0d9aa0af6e549f8ca0114a44a7c Mon Sep 17 00:00:00 2001
From: Ken Brown
Date: Sat, 19 Aug 2017 13:15:04 -0400
Subject: [PATCH] Document renameat2
---
winsup/cygwin/release/2.9.0 | 2
Fix all callers.
---
winsup/cygwin/fhandler_process.cc | 2 +-
winsup/cygwin/pinfo.cc| 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/winsup/cygwin/fhandler_process.cc
b/winsup/cygwin/fhandler_process.cc
index 97436dd1b..08cc7ea92 100644
--- a/winsup/cygwin/fhand
Fix all callers.
---
winsup/cygwin/fhandler_termios.cc | 2 +-
winsup/cygwin/pinfo.cc| 2 +-
winsup/cygwin/signal.cc | 2 +-
winsup/cygwin/sigproc.cc | 5 +++--
winsup/cygwin/times.cc| 10 +++---
5 files changed, 13 insertions(+), 8 deletions(-)
Fix all callers.
---
winsup/cygwin/fhandler_process.cc | 2 +-
winsup/cygwin/pinfo.cc| 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/winsup/cygwin/fhandler_process.cc
b/winsup/cygwin/fhandler_process.cc
index bbb44fa56..97436dd1b 100644
--- a/winsup/cygwin/fhand
Fix all callers.
---
winsup/cygwin/fhandler_dsp.cc | 55 +++
1 file changed, 40 insertions(+), 15 deletions(-)
diff --git a/winsup/cygwin/fhandler_dsp.cc b/winsup/cygwin/fhandler_dsp.cc
index 5ae3309f8..b5c685bf8 100644
--- a/winsup/cygwin/fhandler_dsp.cc
+
---
winsup/cygwin/Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in
index 98727c019..add1de0e9 100644
--- a/winsup/cygwin/Makefile.in
+++ b/winsup/cygwin/Makefile.in
@@ -73,7 +73,7 @@ CRT0:=$(cygwin_build)/crt0.o
Fix all callers.
---
winsup/cygwin/pinfo.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index e792a0a1c..a068bcc42 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -720,7 +720,7 @@ _pinfo::commune_request (_
Fix all callers.
---
winsup/cygwin/pinfo.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index a068bcc42..72aa658eb 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -819,7 +819,7 @@ out:
fhandler_pipe *
_pi
Fix all callers.
---
winsup/cygwin/fhandler_process.cc | 2 +-
winsup/cygwin/pinfo.cc| 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/winsup/cygwin/fhandler_process.cc
b/winsup/cygwin/fhandler_process.cc
index 7f122fbe4..360d8ea81 100644
--- a/winsup/cygwin/fhand
Fix all callers.
---
winsup/cygwin/signal.cc | 15 ---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc
index fbd2b241e..016fce1de 100644
--- a/winsup/cygwin/signal.cc
+++ b/winsup/cygwin/signal.cc
@@ -260,7 +260,7 @@ _pin
Fix all callers.
---
winsup/cygwin/fhandler_process.cc | 2 +-
winsup/cygwin/pinfo.cc| 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/winsup/cygwin/fhandler_process.cc
b/winsup/cygwin/fhandler_process.cc
index 08cc7ea92..453e79b16 100644
--- a/winsup/cygwin/fhand
Fix all callers.
---
winsup/cygwin/fhandler_process.cc | 2 +-
winsup/cygwin/pinfo.cc| 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/winsup/cygwin/fhandler_process.cc
b/winsup/cygwin/fhandler_process.cc
index 360d8ea81..eb5a523ff 100644
--- a/winsup/cygwin/fhand
Fix all callers.
---
winsup/cygwin/external.cc | 2 +-
winsup/cygwin/fhandler_process.cc | 2 +-
winsup/cygwin/pinfo.cc| 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/winsup/cygwin/external.cc b/winsup/cygwin/external.cc
index c81bdc0fa..6aae32aea 100644
Up to now the function winsup/utils/dump_setup.cc:base skips past
colons when parsing file names. As a result, a line like
foo foo-1:2.3-4.tar.bz2 1
in /etc/setup/installed.db would cause 'cygcheck -cd foo' to report 4
as the installed version of foo insted of 1:2.3-4. This is not an
issue no
On 10/25/2017 8:19 AM, Corinna Vinschen wrote:
On Oct 25 14:11, Corinna Vinschen wrote:
Hi Ken,
On Oct 25 07:23, Ken Brown wrote:
Up to now the function winsup/utils/dump_setup.cc:base skips past
colons when parsing file names. As a result, a line like
foo foo-1:2.3-4.tar.bz2 1
in /etc
On 10/25/2017 10:19 AM, Corinna Vinschen wrote:
On Oct 25 09:38, Ken Brown wrote:
On 10/25/2017 8:19 AM, Corinna Vinschen wrote:
On Oct 25 14:11, Corinna Vinschen wrote:
Hi Ken,
On Oct 25 07:23, Ken Brown wrote:
Up to now the function winsup/utils/dump_setup.cc:base skips past
colons when
On 11/12/2017 1:39 PM, Brian Inglis wrote:
Having responded to some of these posts and being prompted by the suggestion in
a reply to one by "Cyg simple", I attach an offering, in the off chance that
anyone affected might actually check the FAQ or find it in a search. ;^>
Even if they don't fin
On 11/12/2017 4:27 PM, Brian Inglis wrote:
+Some ancient Cygwin releases asked users to report problems that were
+ difficult to diagnose to the mailing list with the message:
+
+find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer. Please
report
+this problem to the public
On 12/10/2017 1:40 PM, Brian Inglis wrote:
On 2017-12-10 10:49, Ken Brown wrote:
Mirrors from mirrors.lst have area and location info, which we now
display and add to the sort key.
You didn't increase the list box width - are the hosts visible without
scrolling?
No, that was an over
The attached patch fixes the second problem reported in
https://cygwin.com/ml/cygwin/2018-05/msg00316.html, though I'm not sure
it's the right fix.
Ken
From 4940baac08cd9339d771d9db90a880c61610ae4c Mon Sep 17 00:00:00 2001
From: Ken Brown
Date: Wed, 30 May 2018 16:19:01 -0400
Subje
On 6/1/2018 6:10 AM, Corinna Vinschen wrote:
On May 30 16:28, Ken Brown wrote:
The attached patch fixes the second problem reported in
https://cygwin.com/ml/cygwin/2018-05/msg00316.html, though I'm not sure it's
the right fix.
Ken
From 4940baac08cd9339d771d9db90a880c61610ae4c Mon
tension, so __GNU_VISIBLE would seem to be the right guard.
On the other hand, glibc declares clearenv() if _DEFAULT_SOURCE is
defined, so maybe the guard should be relaxed if our goal is to
emulate Linux.
Yaakov?
Ken Brown (5):
Cygwin: Clarify some code in environ.cc
Cygwin: Allow the
---
winsup/cygwin/include/cygwin/version.h | 3 ++-
winsup/cygwin/release/2.10.1 | 1 +
winsup/doc/posix.xml | 1 +
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/winsup/cygwin/include/cygwin/version.h
b/winsup/cygwin/include/cygwin/version.h
index f0870
---
winsup/cygwin/common.din | 1 +
winsup/cygwin/environ.cc | 20
winsup/cygwin/include/cygwin/stdlib.h | 1 +
3 files changed, 22 insertions(+)
diff --git a/winsup/cygwin/common.din b/winsup/cygwin/common.din
index 6e8bf9185..426cf172c 100644
---
Commit ebd645e on 2001-10-03 made environ.cc:_addenv() add unneeded
space at the end of the environment block to "work around problems
with some buggy applications." This clutters the code and is
presumably no longer needed.
---
winsup/cygwin/environ.cc | 10 --
1 file changed, 4 insertio
Following glibc, interpret this as meaning the environment is empty.
---
winsup/cygwin/environ.cc | 29 ++---
1 file changed, 18 insertions(+), 11 deletions(-)
diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc
index b452d21a5..8e6bbe561 100644
--- a/winsup/c
---
winsup/cygwin/environ.cc | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc
index 43225341c..b452d21a5 100644
--- a/winsup/cygwin/environ.cc
+++ b/winsup/cygwin/environ.cc
@@ -545,6 +545,7 @@ _getenv_r (struct _reent *
On 6/4/2018 3:36 PM, Ken Brown wrote:
Following glibc, interpret this as meaning the environment is empty.
Sorry, please hold off on reviewing this patch. I just noticed that I
missed at least one place (build_env()) where environ==NULL could cause
a crash. I need to fix this and try to
Commit ebd645e on 2001-10-03 made environ.cc:_addenv() add unneeded
space at the end of the environment block to "work around problems
with some buggy applications." This clutters the code and is
presumably no longer needed.
---
winsup/cygwin/environ.cc | 10 --
1 file changed, 4 insertio
---
winsup/cygwin/include/cygwin/version.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/winsup/cygwin/include/cygwin/version.h
b/winsup/cygwin/include/cygwin/version.h
index 2991ab858..958acca3a 100644
--- a/winsup/cygwin/include/cygwin/version.h
+++ b/winsup/cygwin/inc
Following glibc, interpret this as meaning the environment is empty.
---
winsup/cygwin/environ.cc | 40 ++--
winsup/cygwin/pinfo.cc | 7 ---
2 files changed, 30 insertions(+), 17 deletions(-)
diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.
---
winsup/cygwin/common.din | 1 +
winsup/cygwin/environ.cc | 20
winsup/cygwin/include/cygwin/stdlib.h | 3 +++
3 files changed, 24 insertions(+)
diff --git a/winsup/cygwin/common.din b/winsup/cygwin/common.din
index 6e8bf9185..426cf172c 100644
-
the cases in which
environ==NULL could be a problem. I did this by grepping the sources
for 'cur_environ' and '__cygwin_environ', but it's still possible that
I missed something.
I've also incorporated the changes suggested by Corinna and Yaakov.
Ken Brown (6):
---
winsup/cygwin/environ.cc | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc
index 43225341c..b452d21a5 100644
--- a/winsup/cygwin/environ.cc
+++ b/winsup/cygwin/environ.cc
@@ -545,6 +545,7 @@ _getenv_r (struct _reent *
Also add earlier "What changed" items to new-features.xml.
---
winsup/cygwin/include/cygwin/version.h | 3 ++-
winsup/cygwin/release/{2.10.1 => 2.11.0} | 1 +
winsup/doc/new-features.xml | 20
winsup/doc/posix.xml | 1 +
4 files changed, 2
[Redirecting to cygwin-patches.]
On 7/23/2018 11:06 AM, Corinna Vinschen wrote:
On Jul 23 10:43, Ken Brown wrote:
This is obviously very minor, but I bumped into it because of a failing
emacs test.
Cygwin's getfacl prints only one colon after "mask" and "other", but
On 7/23/2018 11:37 AM, Corinna Vinschen wrote:
On Jul 23 11:15, Ken Brown wrote:
[Redirecting to cygwin-patches.]
On 7/23/2018 11:06 AM, Corinna Vinschen wrote:
On Jul 23 10:43, Ken Brown wrote:
This is obviously very minor, but I bumped into it because of a failing
emacs test.
Cygwin
On 7/23/2018 12:06 PM, Ken Brown wrote:
On 7/23/2018 11:37 AM, Corinna Vinschen wrote:
On Jul 23 11:15, Ken Brown wrote:
[Redirecting to cygwin-patches.]
On 7/23/2018 11:06 AM, Corinna Vinschen wrote:
On Jul 23 10:43, Ken Brown wrote:
This is obviously very minor, but I bumped into it
Retain --file as an undocumented option for backwards compatibility.
---
winsup/cygwin/release/2.11.0 | 2 ++
winsup/doc/new-features.xml | 4
winsup/doc/utils.xml | 4 ++--
winsup/utils/setfacl.c | 5 +++--
4 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/winsup
Also fix a typo.
---
winsup/cygwin/fhandler.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index d02b9a913..7e460701c 100644
--- a/winsup/cygwin/fhandler.h
+++ b/winsup/cygwin/fhandler.h
@@ -832,9 +832,10 @@ class fhandle
On 1/10/2019 1:02 PM, Corinna Vinschen wrote:
> On Jan 10 17:56, Ken Brown wrote:
>> Also fix a typo.
>> ---
>> winsup/cygwin/fhandler.h | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/winsup/cygwin/fhandler.h b/wins
On 1/10/2019 3:16 PM, Corinna Vinschen wrote:
> On Jan 10 18:36, Ken Brown wrote:
>> On 1/10/2019 1:02 PM, Corinna Vinschen wrote:
>>> On Jan 10 17:56, Ken Brown wrote:
>>>> Also fix a typo.
>>>> ---
>>>>winsup/cygwin/fhandler.h | 3 +
ould take to allow multiple readers. I'm not
very optimistic about this, but my impression is that the
multiple-writer case is more important in practice.
Ken
Ken Brown (8):
Cygwin: FIFO: stop using overlapped I/O
Cygwin: FIFO: allow multiple writers
Cygwin: FIFO: add a spinlo
Make fhandler_fifo a derived class of fhandler_base instead of
fhandler_base_overlapped.
Replace the create_pipe macro, which is based on
fhandler_pipe::create, by new create_pipe and open_pipe methods.
These use NT functions instead of Win32 functions. Replace fifo_name
by get_pipe_name, which r
Don't let listen_client_thread and raw_read access the client list
simultaneously.
---
winsup/cygwin/fhandler.h | 3 +++
winsup/cygwin/fhandler_fifo.cc | 34 +-
2 files changed, 28 insertions(+), 9 deletions(-)
diff --git a/winsup/cygwin/fhandler.h b/winsup/
Add static functions peek_fifo, thread_fifo, start_thread_fifo, and
fifo_cleanup to select.cc. These are based on the corresponding pipe
functions, the main difference being that peek_fifo loops through the
connected clients to see if any of them have data available for
reading.
Add the fhandler_
Deal with all clients.
---
winsup/cygwin/fhandler.h | 8 +---
winsup/cygwin/fhandler_fifo.cc | 25 +
2 files changed, 30 insertions(+), 3 deletions(-)
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index af5f500bf..0ebc44e0d 100644
--- a/winsup
Fixup each client. Reset listen_client_thr and lct_termination_evt.
---
winsup/cygwin/fhandler_fifo.cc | 9 +
1 file changed, 9 insertions(+)
diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc
index c295c2393..7a592aa0d 100644
--- a/winsup/cygwin/fhandler_fifo.c
Introduce a 'fifo_client_handler' structure that can be used by a
reader to communicate with a writer using an instance of the named
pipe. An fhandler_fifo opened for reading creates a thread that does
the following:
- maintains a list of fifo_client_handlers
- listens for_clients trying to con
Deal with each client.
---
winsup/cygwin/fhandler_fifo.cc | 6 ++
1 file changed, 6 insertions(+)
diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc
index 7a592aa0d..2c20444c6 100644
--- a/winsup/cygwin/fhandler_fifo.cc
+++ b/winsup/cygwin/fhandler_fifo.cc
@@ -867,4
Add a hit_eof method that tries to detect whether any clients are
connected. Before concluding that there are none, it gives the
listen_client thread time to update the client data.
---
winsup/cygwin/fhandler.h | 1 +
winsup/cygwin/fhandler_fifo.cc | 21 -
2 files chang
On 3/23/2019 4:02 PM, Corinna Vinschen wrote:
> Your patch series looks really good. For now I pushed it into the
> topic/fifo branch as you suggested.
Thanks.
> Just be aware that it won't get much 3rd party testing this way, so as
> soon as you feel more confident, let's move it into master.
shell:
$ mkfifo foo
$ exec 7<>foo
$ echo blah > foo
$ read bar <&7
$ echo $bar
blah
Ken
Ken Brown (2):
Cygwin: FIFO: avoid crashes when cloning a client
Cygwin: FIFO: add support for the duplex case
winsup/cygwin/fhandler.h | 7 ++-
winsup/cygwin/
fhandler_fifo::clone called fhandler_base::clone on each client
fhandler. But those fhandlers are actually fhandler_fifo objects, so
when fhandler_base::clone calls copyto, it's actually
fhandler_fifo::copyto that gets called. This can lead to mysterious
crashes.
Fix this by simply calling clone
If a FIFO is opened with O_RDWR access, create the pipe with
read/write access, and make the first client have the handle of that
pipe as its I/O handle.
Adjust fhandler_fifo::raw_read to account for the result of trying to
read from that client if there's no data.
---
winsup/cygwin/fhandler.h
Hi Corinna,
On 3/26/2019 4:36 AM, Corinna Vinschen wrote:
> Hi Ken,
>
> On Mar 25 23:06, Ken Brown wrote:
>> The second patch in this series enables opening a FIFO with O_RDWR
>> access. The underlying Windows named pipe is creted with duplex
>> access, and its handl
---
winsup/cygwin/release/3.1.0 | 14 ++
winsup/doc/new-features.xml | 12
2 files changed, 26 insertions(+)
create mode 100644 winsup/cygwin/release/3.1.0
diff --git a/winsup/cygwin/release/3.1.0 b/winsup/cygwin/release/3.1.0
new file mode 100644
index 0..1f017b
Make fhandler_base::clear_readahead virtual, and implement
fhandler_fifo::clear_readahead. This is called by
dtable::fixup_after_exec; it clears the readahead in each client.
---
winsup/cygwin/fhandler.h | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/winsup/cygwin/fhan
On 3/28/2019 4:13 PM, Corinna Vinschen wrote:
> On Mar 28 19:01, Achim Gratz wrote:
>> Corinna Vinschen writes:
>>> Done. I also pushed out new dev snapshots.
>>
>> No good deed goes unpunished…
>>
>> Whith the 20190327 snapshot our main data processing application is
>> broken. It looks like it
On 3/29/2019 3:17 AM, Achim Gratz wrote:
> Ken Brown writes:
>>> I'm pretty sure Ken would be happy about an STC.
>>
>> Yes, please. Barring that, is there any chance I could see the relevant
>> code,
>> or at least enough of it so that I can see how FI
Hi Takashi,
On 3/30/2019 9:30 AM, Takashi Yano wrote:
> Hi Ken,
>
> Do these patches enable to open FIFO multiple times with O_RDWR?
> mc (midnight commander) tries to open FIFO twice with O_RDWR if
> SHELL=/bin/tcsh, but fails.
> https://cygwin.com/ml/cygwin/2017-03/msg00188.html
No, I'm sorry.
On 4/3/2019 8:33 AM, Achim Gratz wrote:
> Achim Gratz writes:
>> OK, a bit more info: The whole thing runs from a perl script (actually a
>> module) that opens pipes to gnuplot and ghostscript. This code is
>> _really_ old and has seen a lot of Cygwin releases, so it has options to
>> either use t
Add data members 'reader', 'writer', and 'duplexer' to the
fhandler_fifo class. Set them in fhandler_fifo::open. ('duplexer'
replaces the previous '_duplexer'.)
This will be useful in later commits.
---
winsup/cygwin/fhandler.h | 2 +-
winsup/cygwin/fhandler_fifo.cc | 14 --
Ken Brown (14):
Cygwin: FIFO: rename client[] to fc_handler[]
Cygwin: FIFO: hit_eof: add a call to fifo_client_lock
Cygwin: FIFO: remember the type of the fhandler
Cygwin: FIFO: fix a thinko in listen_client_thread
Cygwin: FIFO: fix the error checking in raw_read
Cygwin: check for
---
winsup/cygwin/fhandler_fifo.cc | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc
index 258c3cf8a..764420ffd 100644
--- a/winsup/cygwin/fhandler_fifo.cc
+++ b/winsup/cygwin/fhandler_fifo.cc
@@ -362,7 +362,10 @
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
Don't set the write end of the pipe to non-blocking mode if the FIFO
is opened in blocking mode.
In fhandler_fifo::raw_write in blocking mode, wait for the write to
complete rather than returning -1 with EAGAIN.
If the amount to write is large, write in smaller chunks (of size
determined by a new
Rename fhandler_fifo::get_handle(int) to get_fc_handle(int), and
remove fhandler_fifo::get_handle(void).
---
winsup/cygwin/fhandler.h | 7 ---
winsup/cygwin/select.cc | 2 +-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
ind
If NtReadFile returns STATUS_PENDING, wait for the read to complete.
This can happen, for instance, in the case of a FIFO opened with
O_RDRW.
---
winsup/cygwin/fhandler.cc | 14 +-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/f
The second check of nconnected needs to be protected by a lock as well
as the first.
---
winsup/cygwin/fhandler_fifo.cc | 21 +
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc
index 901696444..70551e
There may be short periods when there's no pipe instance available.
Keep trying.
---
winsup/cygwin/fhandler_fifo.cc | 52 --
1 file changed, 31 insertions(+), 21 deletions(-)
diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc
index 479021e
The word "client" suggests something that holds a handle to the client
side of the pipe (in Windows terminology). But our
fifo_client_handlers hold a handle the server side of the pipe, and
they *connect* to clients.
---
winsup/cygwin/fhandler.h | 20 +++
winsup/cygwin/fhandler_fifo.cc
Make sure that fhandler_base::close rather than fhandler_fifo::close
is called on the fhandler. Also, delete the fhandler, since we
allocated it.
---
winsup/cygwin/fhandler_fifo.cc | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygw
If the pipe is empty, we can get either ERROR_NO_DATA or
ERROR_PIPE_LISTENING.
---
winsup/cygwin/fhandler_fifo.cc | 13 +
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc
index 764420ffd..2da579b95 100644
---
Make read_ready a manual reset event. It should always be set shortly
after startup of the listen_client thread and remain set until the
thread terminates. (We don't want writers to connect without being
recorded in the client handler list.)
Remove the unnecessary code that checks for read_ready
Otherwise it doesn't get started until the dup'd fd tries to read,
which delays client connections.
---
winsup/cygwin/fhandler_fifo.cc | 22 +-
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc
index a
Remove fifo_client_handler::connect and move its code into
listen_client_thread. That way we can check the return status when a
client handler's connect_evt is signaled. Previously we incorrectly
assumed there was a successful connection.
Also simplify listen_client_thread in the following ways:
Don't set the write end of the pipe to non-blocking mode if the FIFO
is opened in blocking mode.
In fhandler_fifo::raw_write in blocking mode, wait for the write to
complete rather than returning -1 with EAGAIN.
If the amount to write is large, write in smaller chunks (of size
determined by a new
On 4/17/2019 1:23 PM, Achim Gratz wrote:
> Corinna Vinschen writes:
>> Pushed with v2 of patch 13. Developer snaps should be up shortly.
>
> I gave the snapshot some testing today.
>
> The good news is that the named FIFO branch of our code works correctly
> again and is faster than going throug
Define fhandler:fifo::fixup_after_exec, which sets listen_client_thr
and lct_termination_evt to NULL. This forces the listen_client thread
to restart on the first attempt to read after an exec. Previously the
exec'd process could hang in fhandler_fifo::raw_read.
---
winsup/cygwin/fhandler.h
On 4/17/2019 2:58 PM, Achim Gratz wrote:
> Ken Brown writes:
>> Thanks for testing. I have STCs for fork and exec that I used when first
>> writing the code, and I forgot to retest those after the recent changes. I
>> just
>> tried, and the fork test succeeds but the
On 4/18/2019 3:04 PM, Corinna Vinschen wrote:
> Ken, you have an account on sware and check-in rights to the cygwin repo
> anyway, so you don't really need me to push patches.
>
> If you feel up to the task, you can also go ahead and review and
> ultimately push patches from others. This also app
Don't set lct_termination_evt to NULL too early in
fhandler_fifo::stop_listen_client. Doing so leads to an "Invalid
Handle" error in WFMO.
---
winsup/cygwin/fhandler_fifo.cc | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cy
Keeping them open too long can cause an attempt to close them twice
after a fork or exec.
---
winsup/cygwin/fhandler_fifo.cc | 17 ++---
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc
index 0e4bf3aee..3ee30
1 - 100 of 491 matches
Mail list logo