FreeBASIC  0.91.0
dev_pipe_close.c
Go to the documentation of this file.
1 /* file device */
2 
3 #include "fb.h"
4 
6 {
7 #if defined( HOST_DOS ) || defined( HOST_UNIX ) || defined( HOST_WIN32 )
8  FILE *fp;
9 
10  FB_LOCK();
11 
12  fp = (FILE*) handle->opaque;
13  if( fp != NULL ) {
14 #ifdef HOST_MINGW
15  _pclose( fp );
16 #else
17  pclose( fp );
18 #endif
19  }
20 
21  handle->opaque = NULL;
22 
23  FB_UNLOCK();
24  return fb_ErrorSetNum( FB_RTERROR_OK );
25 #else
27 #endif
28 }