On 03/25/2011 03:33 PM, Paolo Bonzini wrote:
Now that I think of it, while my patch to the buffer classes is good for GST,
you may want to replace the two implementations of #close with just "self halt".
turns out that sockets use a different set of prims to read/write and that the
primitive does not set the errno like the 'normal' one does. My test case
right now is to connect a remote IP... and after this patch I do get a
connection refused File error.
diff --git a/libgst/prims.def b/libgst/prims.def
index db3254d..efd83b2 100644
--- a/libgst/prims.def
+++ b/libgst/prims.def
@@ -5861,6 +5861,8 @@ primitive VMpr_FileDescriptor_socketOp [succeed,fail]
#endif
fail:
+ if (errno)
+ _gst_set_errno (errno);
PRIM_FAILED;