lost output after pipe redirection

Takashi Yano takashi.yano@nifty.ne.jp
Wed Feb 19 12:58:49 GMT 2025


On 2025年2月19日 20:42:05 +0900
Takashi Yano wrote:
> On 2025年2月19日 07:38:13 +0900
> Takashi Yano wrote:
> > On 2025年2月18日 21:59:36 +0100
> > Marco Atzeriwrote:
> > > On 18/02/2025 12:56, Takashi Yano via Cygwin wrote:
> > > > Hi Marco,
> > > > 
> > > > On 2025年2月17日 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.

This seems to be a problem of libtool. With the test case I attached
previous mail, the stub executable should call execv() with:
<path to the test case>/b/.libs/hello.exe
because hello.exe is in the directory "b".
However, it calls execv() with:
<path to he test case>/a/.libs/hello.exe
Achim, any idea?
-- 
Takashi Yano <takashi.yano@nifty.ne.jp>


More information about the Cygwin mailing list

AltStyle によって変換されたページ (->オリジナル) /