From: <76245.3173@compuserve.com>
Subject: Strange problem with OSF1 V3.2
Date: 1996/09/27 [thread overview]
Message-ID: <52gmj0$9o7@dub-news-svc-6.compuserve.com> (raw)
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 <D> [IFCIN] Error code on last file read 9: Bad file number
23:32:50 <W> Warning: Unable to close directory <|/usr/users/testdg/batch/
fromHOSPAS/|>.
23:32:50 <E> Error 9: Bad file number
23:32:50 <I> Setting alarm for 10 seconds.
23:32:50 <D> [IFCIN] Entering Indefinite Select()
23:33:00 <I> Time to check for files.
reply other threads:[~1996-09-27 4:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox