On 2013-09-09 10:08, Paul J Stevens wrote:
On 09-09-13 08:27, Thomas Raschbacher wrote:

write(13, "Q", 1)                       = -1 EAGAIN (Resource
temporarily unavailable)
read(25, 0x1843e70, 11)                 = -1 EAGAIN (Resource
temporarily unavailable)

Thomas,

could you please test 4c23432cc270554557f9e130331214d81164131b

ok will have a look.

just before I do something wrong:
if I go to http://git.dbmail.eu/paul/dbmail/commit/?h=dbmail_3_1&id=4c23432cc270554557f9e130331214d81164131b and just download the archive there that is fine right? (not a git expert so if this gives me what you want me to test I prefer that -- also no git on my server so i'd have to do that later when I get to my dev box again.)


I've put a mutex lock around the file-handle involved here, since read
and write are not thread-safe, and both actions here can (and will)
happen in different threads.

The only scenario I could come up with is:

Worker thread starts writing to filehandle 13 (the selfpipe). This
triggers a read-event in the main thread even before the worker has
finished writing, causing both of them to be unable to finish the call.

If this hypothesis is correct, this should be solved be mentioned commit ID. And anyway, I doesn't hurt to protect the self-pipe handles with a lock.
sounds like it could happen like that yes.

_______________________________________________
DBmail mailing list
[email protected]
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail

Reply via email to