home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume14 / libpw / part01 / lockgrfile.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-07-15  |  288 b   |  20 lines

  1. /*
  2.  * lockgrfile - check for GTMP, create it when available to
  3.  */
  4.  
  5. #include <stdio.h>
  6. #include "defs.h"
  7.  
  8. lockgrfile()
  9. {
  10.     FILE    *grp;
  11.  
  12.     while ((grp = fopen(GTMP, "r")) != NULL) {
  13.         fclose(grp);
  14. /*        printf("Group file is locked.  Please wait...\n"); */
  15.         sleep(5);
  16.     }
  17.  
  18.     creat(GTMP, 022);
  19. }
  20.