Commit 67fcd58b authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

file write: set default to NONBLOCK if available

parent 3ac32e28
......@@ -3,6 +3,10 @@
* Version 1.7.0 released
* using CGRIBEX library version 1.7.0
2014-07-21 Uwe Schulzweida
* file write: set default to NONBLOCK if available
2014-07-18 Uwe Schulzweida
* added function streamReadVarF() and streamReadVarSliceF()
......
......@@ -801,6 +801,9 @@ void file_initialize(void)
}
}
#if defined (O_NONBLOCK)
FileFlagWrite = O_NONBLOCK;
#endif
envString = getenv("FILE_FLAG_WRITE");
if ( envString )
{
......@@ -1230,8 +1233,10 @@ int fileClose_serial(int fileID)
if ( fileptr->type == FILE_TYPE_FOPEN )
fprintf(stderr, " file pointer : %p\n", (void *) fileptr->fp);
else
fprintf(stderr, " file descriptor : %d\n", fileptr->fd);
{
fprintf(stderr, " file descriptor : %d\n", fileptr->fd);
fprintf(stderr, " file flag : %d\n", FileFlagWrite);
}
fprintf(stderr, " file mode : %c\n", fileptr->mode);
if ( sizeof(off_t) > sizeof(long) )
......
......@@ -8,8 +8,8 @@ int grbInqTimestep(stream_t * streamptr, int tsID);
int grbInqRecord(stream_t * streamptr, int *varID, int *levelID);
int grbDefRecord(stream_t * streamptr);
int grb_write_record(stream_t * streamptr, int memtype, const void *data, int nmiss);
int grbReadRecord(stream_t * streamptr, double *data, int *nmiss);
int grb_write_record(stream_t * streamptr, int memtype, const void *data, int nmiss);
int grbCopyRecord(stream_t * streamptr2, stream_t * streamptr1);
void grbReadVarDP(stream_t * streamptr, int varID, double *data, int *nmiss);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment