Site file access/update question

GHATCHER GERRY at omdc.gso.uri.edu
Mon Aug 3 11:25:00 EDT 1992


Date sent:  3-AUG-1992 10:25:21 


Hi GRASS programmers:
I've got a file access problem described below which I hope someone has a
fix for -thanks.

SYSTEM:
      DECstation 5000/200 running ULTRIX4.2a Grass4.0

PURPOSE:
      I am trying to design a program that runs in the background and updates
a site list file periodically (approx. 10sec intervals) with information from
instruments connected to the computer. For example a research ship which is 
collecting GPS navigation wich is logged via a GRASS program creating a site
list file of navigaition "fixes".

PROBLEM:
      My difficulty is that the site list file opened using 
G_fopen_sites_new(name), and written G_put_site(fp,east,north,desc) 
don't let any other processes access the data until the file is closed. 
This is a problem because I would like to change the files on a daily basis 
and in the mean time be able to use d.sites to show the most up to date 
navigation fixes and not have to wait for the data logging program to 
finish with the file.

QUESTION:
      Is there any way to open a site list file for Append; or "shared" access
so that I could just have the data logging program open and close the same file
each time it gets a new position fix or be able to display a site file
which is still being written to.

Thanks for your time and suggestions!

Gerry Hatcher                   

Ocean Mapping Development Center|      gerry at omdc.gso.uri.edu {Internet}
University of Rhode Island      |            cbeam::gerry {span}
voice (401)-792-6940            |            fax (401)-792-6849




More information about the grass-dev mailing list