Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Test case for issue #345

  • Loading branch information...
commit 5c496ff9d75aa8256e9842c38bb0d3f58736f3a3 1 parent de61f88
@hintjens hintjens authored
Showing with 30 additions and 0 deletions.
  1. +30 −0 345/issue.c
View
30 345/issue.c
@@ -0,0 +1,30 @@
+#include "czmq.h"
+
+static void *
+create_socket (void *context)
+{
+ void *s = zmq_socket (context, ZMQ_REP);
+ assert (s);
+ int rc = zmq_close (s);
+
+ printf ("RC=%d errno=%d\n", rc, errno);
+ if (rc == -1) {
+ puts (strerror (errno));
+ assert (errno == ETERM);
+ }
+ return NULL;
+}
+
+int main (void)
+{
+ void *context = zmq_ctx_new ();
+ pthread_t child;
+ pthread_create (&child, NULL, create_socket, context);
+ // Wait until started creating socket
+ zclock_sleep (1);
+ zmq_ctx_destroy (context);
+ sleep (1);
+ return 0;
+}
+
+
Please sign in to comment.
Something went wrong with that request. Please try again.