[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss-gnuradio] gr.file_descriptor_* and close()
From: |
Martin Braun |
Subject: |
[Discuss-gnuradio] gr.file_descriptor_* and close() |
Date: |
Fri, 8 May 2009 11:13:22 +0200 |
User-agent: |
Mutt/1.5.17 (2007-11-01) |
Hi,
it's just a nitpick, really, but I'd like to vote for chucking out the
close() calls in gr.file_descriptor_{sink,source} (in the destructors).
I've been working with these blocks for talking across pipes, and I
constantly run into warnings because files get closed when I don't want
them to. So far, it hasn't caused any errors, but the reason my code
gets confused is because when I use a named pipe, I have to open it in
one thread and pass the fileno to the GR block. The block, however,
closes the file on destruction, leaving a dangling file ID in the
calling thread.
As I said, it's nothing that can't be caught, but I'd prefer it if the
open() and close() calls happened in the same scope and thread - I've
patched my own copy accordingly and find it much easier to use. As far
as I can tell, no code in the trunk would be affected.
MB
--
Dipl.-Ing. Martin Braun Phone: +49-(0)721-608 3790
Institut fuer Nachrichtentechnik Fax: +49-(0)721-608 6071
Universitaet Karlsruhe (TH) http://www.int.uni-karlsruhe.de/
pgpA8sg1nFjIs.pgp
Description: PGP signature
- [Discuss-gnuradio] gr.file_descriptor_* and close(),
Martin Braun <=