discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Segmentation fault in wav file sink


From: Marcus D. Leech
Subject: Re: [Discuss-gnuradio] Segmentation fault in wav file sink
Date: Sun, 11 Dec 2011 14:31:03 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16

On 12/11/2011 03:18 AM, Matt Mills wrote:
All,

The attached script crashes with a segmentation fault (or with the I/O error text in the code). My C++ knowledge is lacking however I believe this is because work() and close() are both being called simultaneously from different threads. The close() call is being made while the execution of work() is already past the "is this file handle working?" test (I think?).

Thanks,
Matt.
_______________________________________________ Discuss-gnuradio mailing list address@hidden https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
I think that what I'd do is cause the close() method to simply set a flag that says "close desired", and then do the actual close at the end of
  the work function, probably under a mutex.



-- 
Marcus Leech
Principal Investigator
Shirleys Bay Radio Astronomy Consortium
http://www.sbrac.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]