Re: FIFO race condition on SunOS kernels

2019-01-04 Thread Vladimir Marek
For the record, my colleague found the issue. There is bug in libc, race condition between signal and popen. Thank you for the report -- Vlad

Re: FIFO race condition on SunOS kernels

2019-01-03 Thread Chet Ramey
On 1/2/19 9:48 PM, Clark Wang wrote: > On Wed, Jan 2, 2019 at 8:38 PM Vladimir Marek > wrote: > >>> >>> Thanks, that's good to have confirmed! It was hoping as much -- it would >>> have been hard to believe that something this basic is broken on Solaris >> in >>> general. >> >> Heh :) I am heavy

Re: FIFO race condition on SunOS kernels

2019-01-02 Thread Clark Wang
On Wed, Jan 2, 2019 at 8:38 PM Vladimir Marek wrote: > > > > Thanks, that's good to have confirmed! It was hoping as much -- it would > > have been hard to believe that something this basic is broken on Solaris > in > > general. > > Heh :) I am heavy shell scripter/user and I have found multiple

Re: FIFO race condition on SunOS kernels

2019-01-02 Thread Vladimir Marek
Hi, I gave it second look. I think it could be a flaw in your script after all. = a.sh = tmpdir=/var/tmp/FIFOs$$ trap "exec rm -rf $tmpdir" EXIT INT TERM PIPE mkdir "$tmpdir" || exit i=0; while test "$((i+=1))" -le 100; do

Re: FIFO race condition on SunOS kernels

2019-01-01 Thread Martijn Dekker
Op 01-01-19 om 23:47 schreef Vladimir Marek: [...] That said, I do use VirtualBox 5.1.22r115126 which is pretty old. I recently upgraded to VirtualBox 6.0 on Mac OS X 10.11 and the results are identical. Putting 0.5s delay anywhere in the loop makes the problem disappear. Yes, I'd

Re: FIFO race condition on SunOS kernels

2019-01-01 Thread Vladimir Marek
Hi, > You'd think that establishing a pipe between two processes is a very basic > UNIX feature that should work reliably on all UNIX variants. One would think that _opening_ a file is a very basic UNIX feature ... :) > But the following script seems to break consistently on Solaris and

Re: FIFO race condition on SunOS kernels

2018-12-31 Thread Chet Ramey
On 12/31/18 12:37 PM, Martijn Dekker wrote: > You'd think that establishing a pipe between two processes is a very basic > UNIX feature that should work reliably on all UNIX variants. > > But the following script seems to break consistently on Solaris and > variants (SunOS kernels) when executed

FIFO race condition on SunOS kernels

2018-12-31 Thread Martijn Dekker
You'd think that establishing a pipe between two processes is a very basic UNIX feature that should work reliably on all UNIX variants. But the following script seems to break consistently on Solaris and variants (SunOS kernels) when executed by bash, ksh93, or dash. All it does is make 100