Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Examples  

test_wait_for_file.c

This file shows how to use the function wait_for_file().

#include <stdio.h>
#include "files.h"

#define PERIOD 2

int main (int argc, char *argv[])
{
  int cr;

  if (argc != 3)
  {
    fprintf (stderr, "\nUsage: wait_for_file.test <file name> <stop file>\n");
    return 1;
  }

  cr = wait_for_file (argv[1], PERIOD, argv[2]);

  if (cr == 0)
  { fprintf (stdout, "\nFile %s now exists\n", argv[1]); }
  else
  { fprintf (stdout, "\nProcess stoped\n"); }

  return 0;
}

Generated on Thu Apr 3 16:23:42 2003 for Common_C_libraries by doxygen1.3-rc1