Skip to content

Commit 17bd62f

Browse files
author
Shane Snyder
committed
make sure to check for shutdown in fileno
1 parent 49ba1b4 commit 17bd62f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

darshan-runtime/lib/darshan-posix.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -802,19 +802,19 @@ int DARSHAN_DECL(fileno)(FILE *stream)
802802

803803
if(ret >= 0)
804804
{
805+
POSIX_PRE_RECORD();
805806
char *rec_name = darshan_stdio_lookup_record_name(stream);
806807
if(rec_name)
807808
{
808809
rec_id = darshan_core_gen_record_id(rec_name);
809810

810-
POSIX_PRE_RECORD();
811811
rec_ref = darshan_lookup_record_ref(posix_runtime->rec_id_hash,
812812
&rec_id, sizeof(darshan_record_id));
813813
if(!rec_ref)
814814
rec_ref = posix_track_new_file_record(rec_id, rec_name);
815815
POSIX_RECORD_REFOPEN(ret, rec_ref, tm1, tm2, POSIX_FILENOS);
816-
POSIX_POST_RECORD();
817816
}
817+
POSIX_POST_RECORD();
818818
}
819819

820820
return(ret);

0 commit comments

Comments
 (0)