[Gambas-user] open named pipe never returns
Steve
stevjensen at aol.com
Mon Nov 19 05:04:01 CET 2018
The statement
hfile = open pipe "/tmp/mypipe01" for watch (or for read) never returns
(acts like deadlock).
It does actually create the pipe.
Does gambas use fopen internally for access? I get the same behavior in
C if fopen is used instead of open.
There is a restriction:
*Restriction:* If fopen() is used to open named pipes in a
multi-threaded environment, a deadlock will occur. This deadlock is
caused by a named pipe waiting for the other end of the pipe to be
opened, while still holding the fopen() multi-thread mutex. To prevent
this deadlock, use open() to open the named pipe, instead of fopen().
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20181118/4dea1fdc/attachment-0001.html>
More information about the User
mailing list