Source
ready = select(1, (fd_set *) NULL, (fd_set *) NULL, (fd_set *) NULL, &wait); if (ready < 0) {
//# nreal.cc: this defines VLA nearly realtime routines for read VLA data
//# Copyright (C) 1997,1999,2000
//# Associated Universities, Inc. Washington DC, USA.
//#
//# This library is free software; you can redistribute it and/or modify it
//# under the terms of the GNU Library General Public License as published by
//# the Free Software Foundation; either version 2 of the License, or (at your
//# option) any later version.
//#
//# This library is distributed in the hope that it will be useful, but WITHOUT
//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
//# License for more details.
//#
//# You should have received a copy of the GNU Library General Public License
//# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//#
//# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: aips2-request@nrao.edu.
//# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory
//# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA
//#
//# $Id: nreal.cc,v 19.1.34.5 2006/02/17 23:46:40 wyoung Exp $
//# Includes
/*
_olroutines - Routines for fetching data from the current VLA disk file
_olopen - opens the on online status record
_olread - returns a data from the shared memory
_olclose - close out the online status record
Dec 1992 Modified by George Martin to remove timeout while waiting for data
Dec 1992 Switched to _ol for AIPS compatibility
Feb 1993 Added changes made by Wes Young and a little other cleanup
Jun 1993 Changed "sleep()" to sleep1() for fractions of a second
Mar 1994 Begin changes to get rid of "slots", add printing of
internet addresses instead of slot numbers
Sep 1994 Changed routines to wait only when last_record == last_record
avoids alot of hanging problems. Also olopen_ forks aoc_clnt
if it's aips. Probably don't want this for miranda.
This is some real yucky code I wrote a long time ago but as it more or less
works, I'm reluctant to change it too much
*/
/*int MAX_TIME = 60; */
int QUIT = 0;
int ONLINE = 0;
static int Last_Record;
void ThatsAllFolks(int);
void sleep1(double);
static FILE *fpVisData = 0;
static FILE *timeData = 0;
static FILE *hostLog = 0;
static char logDataFile[131];
// int fdVisData;
static long lastMJAD = 0;
static long lastTick = 0;
static long MJAD = 0;
static off_t lastOffset;
static int oldDay =0;