On Wed, 19 Feb 2025 07:38:13 +0900 Takashi Yano wrote: > On Tue, 18 Feb 2025 21:59:36 +0100 > Marco Atzeriwrote: > > On 18/02/2025 12:56, Takashi Yano via Cygwin wrote: > > > Hi Marco, > > > > > > On Mon, 17 Feb 2025 09:28:11 +0100 > > > Marco Atzeri wrote: > > >> Hi Takashi, > > >> > > >> I think there is still issue on pipe redirection output lost. > > >> I have two cases where during package tests the test are reported as > > >> failures as the output is missing, while running the test stand alone > > >> the output is produced as expected. > > >> > > > > >> -------------------------------------------------------------- > > > > > > This is not a pipe problem, but just a path problem for gdbmtool. > > > Please try the patch attached. > > > > Thanks Takashi, > > > > it works. > > I reported the solution upstream. > > I forgot to mention, but this problem does not occur in Linux. > I don't know why.
I digged this deeper. I noticed that this is not a simple path problem. Even if gdbmtool.exe is in the path, running it fails if the directory named gdbmtool exists in the path prior to gdmtool.exe. Simple test case which reproduce this problem is attached. This problem occurs if the executable is linked with libtool. The expected output of the test case is: Hello 1 Hello 2 Hello 3 However, the output in cygwin is: Hello 1 127 Hello 3 The culprit would be libtool or cygwin1.dll. libtool is the large scale shell script, so I do not find the cause so far. -- Takashi Yano <takashi.y...@nifty.ne.jp>
#!/bin/sh rm -rf a/hello b mkdir -p b cd b cat > hello.c <<EOF #include <stdio.h> int main(int argc, char *argv[]) { printf("Hello %s\n", argc > 1 ? argv[1] : ""); return 0; } EOF gcc -c hello.c -o hello.o && libtool --mode=link gcc hello.o -o hello cd .. export PATH="${PWD}/a:${PWD}/b:/usr/bin" hello 1 || echo $? mkdir -p a/hello hello 2 || echo $? cd b gcc hello.c -o hello cd .. hello 3 || echo $?
-- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple