Guest User

Problem with "Resource Temporarily Unavailable"

a guest
Jul 11th, 2014
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. /*
  2. CZMQ Version: 2.2.0
  3. ZeroMQ Version: 4.0.4
  4. GCC:
  5. gcc (Debian 4.7.2-5) 4.7.2
  6. Copyright (C) 2012 Free Software Foundation, Inc.
  7. This is free software; see the source for copying conditions. There is NO
  8. warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  9.  
  10.  
  11. jricher@eris$ gcc -otestcase -lzmq -lczmq testcase.c
  12. jricher@eris$ ./testcase
  13. Unable to bind port inproc://mike
  14. Exiting...
  15. Errno: Resource temporarily unavailable
  16. Numeric Value: 11
  17.  
  18. */
  19. #include <czmq.h>
  20.  
  21. const char msgbus_bind[]="inproc://mike";
  22. const char msgbus_connect[]="inproc://mike";
  23.  
  24. void main(void) {
  25. zctx_t *zctx=zctx_new();
  26. assert(zctx);
  27.  
  28. void *sock_msgbus = zsocket_new(zctx, ZMQ_ROUTER);
  29. assert(sock_msgbus);
  30. int rv = zsocket_bind(sock_msgbus, msgbus_bind);
  31. if (rv == 0) {
  32. printf("Unable to bind port %s\nExiting...\n",msgbus_bind);
  33. printf("Errno: %s\n",strerror(errno));
  34. printf("Numeric Value: %i\n", errno);
  35. }
  36.  
  37. zsocket_destroy(zctx, sock_msgbus);
  38. zctx_destroy(&zctx);
  39. }
Advertisement
Add Comment
Please, Sign In to add comment