home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume14 / sharedmem / part01 / src / server8b.c < prev    next >
Encoding:
C/C++ Source or Header  |  1988-05-17  |  366 b   |  18 lines

  1. /* server8b.c - receive updates from common memory but do not read() */
  2. /* see if cmm eventually hangs on write() */
  3.  
  4. #include <sys/time.h>
  5. #include "cm.h"
  6.  
  7. cm_variable *variable;
  8.  
  9. main()
  10. {
  11.     if (0>cm_init("constant reader hang",0,0)) exit(-1);
  12.  
  13.     if (!(variable = cm_declare("variable",CM_ROLE_READER|CM_ROLE_WAKEUP))) exit(-1);
  14.  
  15.     cm_sync(CM_NO_WAIT);
  16.     sigpause();
  17. }
  18.