[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

pipe(2) - fdopen(3) - fclose(3) problem



Hi!

I've experienced a strange thing about a pipe-fdopen-fclose
combination. In some cases, the order how I close the two sides of the
pipe in a signlge process matters. The wrong order implies memory leak and
process termination. 

I've written a small test program to demonstrate it, it is accessable at
http://inno.bme.hu/~igor2/tmp/pipe-fdopen-fclose.tar.gz

I use Debian GNU/Linux, my libc6 version 2.3.2.ds1-22 on i386 (Pentium 1). 

The problem raises only if I write the open pipe and it is gone if i flush
after the write. I am not sure it is a bug, but couldn't find anything
about it in the docs.

TIA

Igor2



Reply to: