]> pd.if.org Git - pdclib/blobdiff - functions/stdio/fclose.c
tmpfile() implementation now based on /proc/sys/kernel/random/uuid.
[pdclib] / functions / stdio / fclose.c
index dc27fe2eb1555a5e36bd7ceb513390d675baf415..0e822eb95ad58af5518497af060b032a22a63d7e 100644 (file)
@@ -43,8 +43,14 @@ int fclose( struct _PDCLIB_file_t * stream )
             {
                 _PDCLIB_filelist = stream->next;
             }
+            /* Delete tmpfile() */
+            if ( stream->status & _PDCLIB_DELONCLOSE )
+            {
+                remove( stream->filename );
+            }
             /* Free stream */
             free( stream );
+
             return 0;
         }
         previous = current;