Path: csiph.com!weretis.net!feeder8.news.weretis.net!news.mixmin.net!aioe.org!P703Hxu1m1uplaQVJzdzug.user.46.165.242.75.POSTED!not-for-mail From: news@zzo38computer.org.invalid Newsgroups: comp.lang.postscript Subject: Re: Reading from %pipe% blocks if the program writes only a few output (example) Date: Tue, 11 Jan 2022 15:56:35 -0800 Organization: Aioe.org NNTP Server Message-ID: <1641945002.bystand@zzo38computer.org> References: <1641626040.bystand@zzo38computer.org> Mime-Version: 1.0 Injection-Info: gioia.aioe.org; logging-data="39265"; posting-host="P703Hxu1m1uplaQVJzdzug.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org"; User-Agent: bystand/1.3.0pre X-Notice: Filtered by postfilter v. 0.9.2 Xref: csiph.com comp.lang.postscript:3719 Perhaps I should provide a example: (%pipe%echo -n 1; sleep 1; echo -n 2; xkbbell; sleep 1; echo -n 3) (r) file read pstack flush The expectation should be that the first byte (49) should be readable right away, and then after one second is a bell and the second byte is readable, etc. That isn't what it does; instead it executes (including the bell after one second), but only after two seconds (when the program specified in the pipe is terminated) will it be readable. It works as expected if it is read from %stdin (piping it to Ghostscript, given suitable PostScript code) instead of %pipe%, though. -- Don't laugh at the moon when it is day time in France.