Re: incorrect text mode graphic character display

2020-05-07 Thread briand
On Thu, 07 May 2020 19:31:28 -0700 David Rothenberger wrote: > On 2020-05-07 15:10, bri...@pounceofcats.com wrote: > > On Thu, 7 May 2020 23:26:37 +0200 > > Eric Lilja wrote: > > > >> Cygwin itself is actually just DLL, you can select a previous version > >> of it > >> in setup.exe. That

Re: incorrect text mode graphic character display

2020-05-07 Thread Brian Inglis
On 2020-05-07 16:12, Brian D wrote: > On Thu, 7 May 2020 15:52:06 -0600, Brian Inglis wrote: [please ensure all email addresses are stripped from the body] >> As that env var is interpreted by the main Cygwin process cygwin1.dll, which >> has >> to be unloaded and reloaded, I'd set

Re: incorrect text mode graphic character display

2020-05-07 Thread André Bleau via Cygwin
Brian wrote: __ success! That did it.  What i find particularly strange is that it fixes the problem in mintty as well as the terminals i'm running in x-windows, for example the xfce4-terminal. I had no idea such a thing as the cygwin.dll existed, i would have

Re: incorrect text mode graphic character display

2020-05-07 Thread David Rothenberger
On 2020-05-07 15:10, bri...@pounceofcats.com wrote: On Thu, 7 May 2020 23:26:37 +0200 Eric Lilja wrote: Cygwin itself is actually just DLL, you can select a previous version of it in setup.exe. That solved our issue with corrupted display of Maven. You can also install older versions of any

Re: Default mingw _WIN32_WINNT

2020-05-07 Thread Yaakov Selkowitz
On Tue, 2020-05-05 at 10:54 +0200, Corinna Vinschen wrote: > On May 5 08:45, Biswapriyo Nath via Cygwin wrote: > > Chaging the defines in package may break others installation. > > No, it doesn't in this case. In what case would it? > Yaakov is talking about mingw-w64 headers used to create

Re: incorrect text mode graphic character display

2020-05-07 Thread briand
On Thu, 7 May 2020 15:52:06 -0600 Brian Inglis wrote: > As that env var is interpreted by the main Cygwin process cygwin1.dll, which > has > to be unloaded and reloaded, I'd set CYGWIN=disable_pcon in the System > environment, then shut down all Cygwin processes, as you would before running >

Re: incorrect text mode graphic character display

2020-05-07 Thread briand
On Thu, 7 May 2020 23:26:37 +0200 Eric Lilja wrote: > Cygwin itself is actually just DLL, you can select a previous version of it > in setup.exe. That solved our issue with corrupted display of Maven. You > can also install older versions of any package (but not all old versions > ever published

Re: incorrect text mode graphic character display

2020-05-07 Thread Brian Inglis
On 2020-05-07 15:09, bri...@pounceofcats.com wrote: > On Thu, 7 May 2020 20:19:29 + > André Bleau via Cygwin wrote: >> Brian D wrote: >>> Assuming Julia is a not Cygwin program, >>> you can try "CYGWIN=disable_pcon" before any Cygwin process >> Did not help. >> Thanks for that though, I

Re: incorrect text mode graphic character display

2020-05-07 Thread Eric Lilja via Cygwin
Cygwin itself is actually just DLL, you can select a previous version of it in setup.exe. That solved our issue with corrupted display of Maven. You can also install older versions of any package (but not all old versions ever published will be available to choose from, just a few ones). Anyway,

Re: incorrect text mode graphic character display

2020-05-07 Thread briand
On Thu, 7 May 2020 22:22:56 +0200 Eric Lilja wrote: > You simply run the setup program, it's possible to select a few older > versions. > oh, i was thinking i could simply select a previous version of cygwin as a whole. are you talking about selecting previous versions of specific packages ?

Re: incorrect text mode graphic character display

2020-05-07 Thread briand
On Thu, 7 May 2020 20:19:29 + André Bleau via Cygwin wrote: > Brian wrote: > > > > Assuming Julia is a not Cygwin program, > > you can try "CYGWIN=disable_pcon" before any Cygwin process > > Did not help. > > Thanks for that though, I had no idea

Re: incorrect text mode graphic character display

2020-05-07 Thread Eric Lilja via Cygwin
You simply run the setup program, it's possible to select a few older versions. - Eric L On Thu, May 7, 2020 at 6:32 PM wrote: > On Thu, 7 May 2020 18:01:59 +0200 > Eric Lilja wrote: > > > Did you try to go back to Cygwin 3.0.7? At work, we had to do that, after > > output from Maven (which

[PATCH 21/21] Cygwin: FIFO: update commentary

2020-05-07 Thread Ken Brown via Cygwin-patches
The beginning of fhandler_fifo.cc contains a long comment giving an overview of the FIFO implementation. This is now updated to describe the support for multiple readers. --- winsup/cygwin/fhandler_fifo.cc | 58 -- 1 file changed, 35 insertions(+), 23 deletions(-)

[PATCH 11/21] Cygwin: FIFO: add shared memory

2020-05-07 Thread Ken Brown via Cygwin-patches
Even though we currently allow a FIFO to be opened for reading only once, we can still have more than one reader open because of dup and fork. Add a named shared memory section accessible to all readers of a given FIFO. In future commits we will add information needed by all readers to this

[PATCH 14/21] Cygwin: FIFO: designate one reader as owner

2020-05-07 Thread Ken Brown via Cygwin-patches
Among all the open readers of a FIFO, one is declared to be the owner. This is the only reader that listens for client connections, and it is the only one that has an accurate fc_handler list. Add shared data and methods for getting and setting the owner, as well as a lock to prevent more than

[PATCH 17/21] Cygwin: FIFO: take ownership on exec

2020-05-07 Thread Ken Brown via Cygwin-patches
If fixup_after_exec is called on a non-close-on-exec reader whose parent is the owner, transfer ownership to the child. Otherwise the parent's pipe handles will be closed before any other reader can duplicate them. To help with this, make the cancel_evt and thr_sync_evt handles inheritable, so

[PATCH 18/21] Cygwin: FIFO: find a new owner when closing

2020-05-07 Thread Ken Brown via Cygwin-patches
If the owning reader is closing, wait for another reader (if there is one) to take ownership before closing the owner's pipe handles. To synchronize the ownership transfer, add events owner_needed_evt and owner_found_evt, and add methods owner_needed and owner_found to set/reset them. Modify the

[PATCH 10/21] Cygwin: FIFO: use a cygthread instead of a homemade thread

2020-05-07 Thread Ken Brown via Cygwin-patches
This will simplify future work. Rename the thread from "listen_client_thread" to "fifo_reader_thread" because it will be used for more than just listening. Remove the fixup_before stuff, which won't be needed after future changes to fixup_after_fork and fixup_after_exec. ---

[PATCH 19/21] Cygwin: FIFO: allow any reader to take ownership

2020-05-07 Thread Ken Brown via Cygwin-patches
Add a take_ownership method, used by raw_read and select.cc:peek_fifo. It wakes up all fifo_reader_threads and allows the caller to become owner. The work is done by the fifo_reader_threads. For synchronization we introduce several new fhandler_fifo data members and methods: - update_needed_evt

[PATCH 13/21] Cygwin: FIFO: introduce a new type, fifo_reader_id_t

2020-05-07 Thread Ken Brown via Cygwin-patches
This uniquely identifies an fhandler_fifo open for reading in any process. Add a new data member 'me' of this type, which is set in open, dup, fork, and exec. --- winsup/cygwin/fhandler.h | 23 +++ winsup/cygwin/fhandler_fifo.cc | 9 - 2 files changed, 31

[PATCH 09/21] Cygwin: FIFO: make opening a writer more robust

2020-05-07 Thread Ken Brown via Cygwin-patches
- Make read_ready a manual-reset event. - Signal read_ready in open instead of in the listen_client_thread. - Don't reset read_ready when the listen_client thread terminates; instead do it in close(). - Rearrange open and change its error handling. - Add a wait_open_pipe method that waits

[PATCH 04/21] Cygwin: FIFO: simplify the listen_client_thread code

2020-05-07 Thread Ken Brown via Cygwin-patches
Always return 0; no one is doing anything with the return value anyway. Remove the return value from stop_listen_client. Make the connection event auto-reset, so that we don't have to reset it later. Simplify the process of connecting a bogus client when thread termination is signaled. Make

[PATCH 01/21] Cygwin: FIFO: minor change - use NtClose

2020-05-07 Thread Ken Brown via Cygwin-patches
Replace CloseHandle by NtClose since all handles are created by NT functions. --- winsup/cygwin/fhandler_fifo.cc | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index

[PATCH 20/21] Cygwin: FIFO: support opening multiple readers

2020-05-07 Thread Ken Brown via Cygwin-patches
Although we can have multiple readers open because of dup/fork/exec, the current code does not support multiple readers opening a FIFO by explicitly calling 'open'. The main complication in supporting this is that when a blocking reader tries to open and there's already one open, it has to check

[PATCH 08/21] Cygwin: FIFO: fix hit_eof

2020-05-07 Thread Ken Brown via Cygwin-patches
According to Posix, a FIFO open for reading is at EOF if it is empty and there are no writers open. The only way to test this is to poll the fifo_client_handlers as in raw_read and select.cc:peek_fifo. The current hit_eof instead relies on the value of nconnected, which can be out of date. On

[PATCH 00/21] FIFO: Support multiple readers

2020-05-07 Thread Ken Brown via Cygwin-patches
This project began as a an attempt to allow a FIFO to be opened multiple times for reading. The initial motivation was that Midnight Commander running under tcsh does this (unsuccessfully on Cygwin). See https://sourceware.org/pipermail/cygwin/2019-December/243317.html It quickly became

[PATCH 16/21] Cygwin: FIFO: add a shared fifo_client_handler list

2020-05-07 Thread Ken Brown via Cygwin-patches
This is in a new shared memory section. We will use it for temporary storage of the owner's fc_handler list when we need to change owner. The new owner can then duplicate the pipe handles from that list before taking ownership. Add several shared data members and methods that are needed for the

[PATCH 12/21] Cygwin: FIFO: keep track of the number of readers

2020-05-07 Thread Ken Brown via Cygwin-patches
Add data and methods to the shared memory that keep track of the number of open readers. Increment this number in open, dup, fork, and exec. Decrement it in close. Reset read_ready if there are no readers left. --- winsup/cygwin/fhandler.h | 8 winsup/cygwin/fhandler_fifo.cc |

[PATCH 05/21] Cygwin: FIFO: remove the arm method

2020-05-07 Thread Ken Brown via Cygwin-patches
There's no reason to check for errors when we set read_ready or write_ready. We don't do that for other events. --- winsup/cygwin/fhandler.h | 1 - winsup/cygwin/fhandler_fifo.cc | 34 +++--- 2 files changed, 3 insertions(+), 32 deletions(-) diff --git

[PATCH 02/21] Cygwin: FIFO: simplify the fifo_client_handler structure

2020-05-07 Thread Ken Brown via Cygwin-patches
Replace the 'fhandler_base *' member by a HANDLE to the server side of the Windows named pipe instance. Make the corresponding simplifications throughout. --- winsup/cygwin/fhandler.h | 19 +++--- winsup/cygwin/fhandler_fifo.cc | 65 -- 2 files changed,

[PATCH 06/21] Cygwin: FIFO: honor the flags argument in dup

2020-05-07 Thread Ken Brown via Cygwin-patches
Also improve the error handling. --- winsup/cygwin/fhandler_fifo.cc | 60 +++--- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index 44919c19e..f61e2fe72 100644 ---

[PATCH 07/21] Cygwin: FIFO: dup/fork/exec: make sure child starts unlocked

2020-05-07 Thread Ken Brown via Cygwin-patches
There can be deadlocks if the child starts with its fifo_client_lock in the locked state. --- winsup/cygwin/fhandler_fifo.cc | 31 +++ 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index

[PATCH 03/21] Cygwin: FIFO: change the fifo_client_connect_state enum

2020-05-07 Thread Ken Brown via Cygwin-patches
Make the values correspond to the possible return values of fifo_client_handler::pipe_state(). When cleaning up the fc_handler list in listen_client_thread(), don't delete handlers in the fc_closing state. I think the pipe might still have input to be read in that case. Set the state to

[PATCH 15/21] Cygwin: FIFO: allow fc_handler list to grow dynamically

2020-05-07 Thread Ken Brown via Cygwin-patches
Make fc_handler a pointer to malloc'd memory instead of a fixed-size array. The size is now a new data member 'shandlers'. Call realloc in add_client_handler if we need to grow the array. free fc_handler in close. As long as we're touching that code, also remove an unneeded lock. ---

Re: incorrect text mode graphic character display

2020-05-07 Thread André Bleau via Cygwin
Brian wrote: > Assuming Julia is a not Cygwin program, > you can try "CYGWIN=disable_pcon" before any Cygwin process Did not help. Thanks for that though, I had no idea those kind of env variables were available. Brian

Re: incorrect text mode graphic character display

2020-05-07 Thread briand
On Thu, 7 May 2020 19:31:01 +0200 Marco Atzeri via Cygwin wrote: > > Any ideas on what i might try ? > > > > Thanks ! > > > > > Assuming Julia is a not Cygwin program, > you can try "CYGWIN=disable_pcon" before any Cygwin process Did not help. Thanks for that though, I had no idea those

Re: pdfcrop and ghostscript

2020-05-07 Thread Ken Brown via Cygwin
On 5/7/2020 6:56 AM, Lemures Lemniscati via Cygwin wrote: Hi! I tried to use pdfcrop in texlive-collection-binextra 20200406-1 And it didn't work correctly with ghostscript 9.27-2 libgs9 9.27-2 libgs-devel 9.27-2 (cropping wrong area) But it works well with test

Re: incorrect text mode graphic character display

2020-05-07 Thread Marco Atzeri via Cygwin
Am 07.05.2020 um 17:18 schrieb bri...@pounceofcats.com: Hi, Doesn't matter what terminal i'm using, I'm having a problem with the way graphic characters print. Julia uses unicode output, and will generate output that should look like this: julia> x=DataFrame([(1,2,3), (4,5,6)]) 2×3 DataFrame

Re: incorrect text mode graphic character display

2020-05-07 Thread briand
On Thu, 7 May 2020 18:01:59 +0200 Eric Lilja wrote: > Did you try to go back to Cygwin 3.0.7? At work, we had to do that, after > output from Maven (which is colored) gets corrupted after a change in 3.1.0 > and onwards. The output problem we saw manifests itself slightly different > from yours,

Re: incorrect text mode graphic character display

2020-05-07 Thread Eric Lilja via Cygwin
Did you try to go back to Cygwin 3.0.7? At work, we had to do that, after output from Maven (which is colored) gets corrupted after a change in 3.1.0 and onwards. The output problem we saw manifests itself slightly different from yours, but it might be worth trying Cygwin 3.0.7 nonetheless. -

incorrect text mode graphic character display

2020-05-07 Thread briand
Hi, Doesn't matter what terminal i'm using, I'm having a problem with the way graphic characters print. Julia uses unicode output, and will generate output that should look like this: julia> x=DataFrame([(1,2,3), (4,5,6)]) 2×3 DataFrame │ Row │ 1 │ 2 │ 3 │ │ │ Int64 │ Int64 │

Re: Problems with a combination of a mingw program, mintty, and CYGWIN=disable_pcon

2020-05-07 Thread André Bleau via Cygwin
Takashi Yano wrote: Hi André, Thanks for the report. On Thu, 7 May 2020 03:38:25 + André Bleau via Cygwin wrote: > Hi cygwin users, > > I have cli program that I run with mintty. It is a simple C++ program, > reading from cin and outputing to cout.

pdfcrop and ghostscript

2020-05-07 Thread Lemures Lemniscati via Cygwin
Hi! I tried to use pdfcrop in texlive-collection-binextra 20200406-1 And it didn't work correctly with ghostscript 9.27-2 libgs9 9.27-2 libgs-devel 9.27-2 (cropping wrong area) But it works well with test version ghostscript 9.50-1 libgs9 9.50-1

Re: Problems with a combination of a mingw program, mintty, and CYGWIN=disable_pcon

2020-05-07 Thread Takashi Yano via Cygwin
Hi André, Thanks for the report. On Thu, 7 May 2020 03:38:25 + André Bleau via Cygwin wrote: > Hi cygwin users, > > I have cli program that I run with mintty. It is a simple C++ program, > reading from cin and outputing to cout. It is cross-compiled as a mingw > program. I've been

Re: Odd hang of cc1.exe *resolved. /tmp/cygwin1.dll. Apologies * cpp/gcc

2020-05-07 Thread Shaddy Baddah
Hi, On 7/5/20 1:44 pm, Shaddy Baddah wrote: Thanks. Yes, I am mapping my directory outside the cygwin directory tree, via /etc/fstab. I will certainly check the perms and see if they make a difference. However, you must admit, it is weird that running as.exe with path /usr/bin/as.exe does not