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

test_copy_lock.c

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

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


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

  if (argc != 3)
  {
    fprintf (stderr, "\nUsage: copy_lock.test <source> <destination>\n");
    return 1;
  }

  cr = append_file_with_lock(argv[1], argv[2]);

  if (cr != COPY_OK)
  {
    fprintf (stderr, "\n\nERROR! code is %d\n", cr);
    return 1;
  }

  fprintf (stdout, "\n\nDONE\n\n");

  return 0;
}


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