Hi,
I noticed, everytime -purge has run my symlink /v/c/w/html/ disappeared.
I the log I find messages like:
#v+
Cached file 'http/www.suse.cz/.' is not valid (U* or D* file); deleting it.
Cannot unlink file 'http/www.suse.cz/.' (1) [Is a directory]; race condition?
Cached file 'http/www.suse.cz/..' is not valid (U* or D* file); deleting it.
Cannot unlink file 'http/www.suse.cz/..' (1) [Is a directory]; race condition?
Cached file 'http/www.rehab.uiuc.edu/..' is not valid (U* or D* file); deleting
...
Cached file 'ftp/../prevtime7' is not valid (U* or D* file); deleting it.
Cannot unlink file 'ftp/../prevtime7' (1) [Is a directory]; race condition?
Cached file 'ftp/../finger' is not valid (U* or D* file); deleting it.
Cannot unlink file 'ftp/../finger' (1) [Is a directory]; race condition?
Cached file 'ftp/../prevtime2' is not valid (U* or D* file); deleting it.
Cannot unlink file 'ftp/../prevtime2' (1) [Is a directory]; race condition?
Cached file 'ftp/../html' is not valid (U* or D* file); deleting it.
Cached file 'ftp/../prevout1' is not valid (U* or D* file); deleting it.
Cannot unlink file 'ftp/../prevout1' (1) [Is a directory]; race condition?
#v-
If did the following patch and now all goes right.
#v+
diff -ur wwwoffle-2.8a/src/purge.c wwwoffle-2.8a.patched/src/purge.c
--- wwwoffle-2.8a/src/purge.c 2004-02-02 01:54:56.000000000 +0100
+++ wwwoffle-2.8a.patched/src/purge.c 2004-02-02 01:48:10.000000000 +0100
@@ -262,17 +262,23 @@
if(!dir)
{PrintMessage(Warning,"Cannot open directory '%s' [%!s]; not
purged.",proto);ChangeBackToSpoolDir();c
+#if 0
ent=readdir(dir); /* skip . */
if(!ent)
{PrintMessage(Warning,"Cannot read directory '%s' [%!s]; not
purged.",proto);closedir(dir);ChangeBack
ent=readdir(dir); /* skip .. */
-
+#endif
+
/* Search through all of the sub directories. */
while((ent=readdir(dir)))
{
struct stat buf;
+ if (ent->d_name[0] == '.' &&
+ (ent->d_name[1] == '\0' || (ent->d_name[1] == '.' && ent->d_name[2] ==
'\0')) )
+ continue;
+
if(stat(ent->d_name,&buf))
PrintMessage(Inform,"Cannot stat directory '%s/%s' [%!s]; race
condition?",proto,ent->d_name);
else if(S_ISDIR(buf.st_mode))
@@ -519,17 +525,23 @@
PrintMessage(Warning,"Cannot open directory 'outgoing' [%!s]; not purged.");
else
{
+#if 0
ent=readdir(dir); /* skip . */
if(!ent)
PrintMessage(Warning,"Cannot read directory 'outgoing' [%!s]; not purged.");
else
{
ent=readdir(dir); /* skip .. */
-
+#endif
+ {
while((ent=readdir(dir)))
{
struct stat buf;
+ if (ent->d_name[0] == '.' &&
+ (ent->d_name[1] == '\0' || (ent->d_name[1] == '.' && ent->d_name[2]
== '\0')) )
+ continue;
+
if(*ent->d_name=='U' || *ent->d_name=='O')
{
int s;
@@ -592,18 +604,24 @@
PrintMessage(Warning,"Cannot open directory 'temp' [%!s]; not purged.");
else
{
+#if 0
ent=readdir(dir); /* skip . */
if(!ent)
PrintMessage(Warning,"Cannot read directory 'temp' [%!s]; not purged.");
else
{
ent=readdir(dir); /* skip .. */
-
+#endif
+ {
while((ent=readdir(dir)))
if(!strncmp(ent->d_name,"tmp.",4))
{
struct stat buf;
+ if (ent->d_name[0] == '.' &&
+ (ent->d_name[1] == '\0' || (ent->d_name[1] == '.' && ent->d_name[2]
== '\0')) )
+ continue;
+
if(!stat(ent->d_name,&buf) && buf.st_mtime<(now-60))
{
#if DO_DELETE
@@ -664,17 +682,23 @@
if(!dir)
{PrintMessage(Warning,"Cannot open directory '%s/%s' [%!s]; not
purged.",proto,host);ChangeBackToSpoolDir()
+#if 0
ent=readdir(dir); /* skip . */
if(!ent)
{PrintMessage(Warning,"Cannot read directory '%s/%s' [%!s]; not
purged.",proto,host);closedir(dir);ChangeBa
ent=readdir(dir); /* skip .. */
-
+#endif
+
/* Check all of the files for age, and delete as needed. */
while((ent=readdir(dir)))
{
struct stat buf,buf2;
+ if (ent->d_name[0] == '.' &&
+ (ent->d_name[1] == '\0' || (ent->d_name[1] == '.' && ent->d_name[2] == '\0')) )
+ continue;
+
if(stat(ent->d_name,&buf))
;
/*
#v-
J�rg.
--
�Perl - the only language that looks the same
before and after RSA encryption.� -- Keith Bostic