From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,f5d0b474c002c76f,start X-Google-Attributes: gid1164f8,public From: <76245.3173@compuserve.com> Subject: Strange problem with OSF1 V3.2 Date: 1996/09/27 Message-ID: <52gmj0$9o7@dub-news-svc-6.compuserve.com>#1/1 X-Deja-AN: 185647307 organization: CompuServe Incorporated content-type: text/plain newsgroups: comp.sys.dec Has anyone ever seen this before on OSF1 V3.2? I am doing an opendir() on a valid directory which works okay, but then the first call to readdir() returns NULL, even though I know the directory is valid and I know there are files to be read. Then the closedir() returns an error. I am enclosing a uname, some of the source, and the output file. Please email if you can help. Thanks. bash$ uname -a OSF1 SWS015.swsahs.nsw.gov.au V3.2 148 alpha bash$ ls /usr/users/testdg/batch/fromHOSPAS/ h001.dat h001.flg h002.dat h002.flg if ((dp = opendir(G_control.batch_input_directory) == NULL)) { write_log (FATAL, "Unable to open directory <|%s|>.\n", G_control.batch_input_directory); write_log(ERROR, "Error %d: %s\n", errno, SysErr ) ; return (FAILURE); } while ((dirp = readdir(dp)) != NULL) { if (strstr(dirp->d_name, "flg") != NULL) if (strcmp(dirp->d_name, first_flag_file_name) < 0) { strcpy(first_flag_file_name, dirp->d_name); at_least_one_file = TRUE; } } /* End of while processing entries in directory */ debug_log(CHILD_INFO, "Error code on last file read %d: %s\n" , errno, SysErr ) ; if (closedir(dp) < 0) { write_log (WARNING, "Warning: Unable to close directory <|%s|>.\n", G_control.batch_input_directory); write_log(ERROR, "Error %d: %s\n", errno, SysErr ) ; } /* Closing directory */ if (at_least_one_file == TRUE) 23:32:50 [IFCIN] Error code on last file read 9: Bad file number 23:32:50 Warning: Unable to close directory <|/usr/users/testdg/batch/ fromHOSPAS/|>. 23:32:50 Error 9: Bad file number 23:32:50 Setting alarm for 10 seconds. 23:32:50 [IFCIN] Entering Indefinite Select() 23:33:00 Time to check for files.