TeamSite 6.5 SP2
Solaris 9
I have been asked to look at a perl script created many years ago that attempts to create a single html file from a DCR and a PT using the following code (simplified and removed error handling for sake of post):
my $command = "$iwhome/bin/iwgen -t $template -r $dcr $outputfile";
system($command);
logDebug("Successfully generated $outputfile at " . localtime());
The resulting log output looks something like:
Successfully generated /default/main/..../index.html at Tue Jul 24 10:46:39 2007
However, the time stamp in the file system shows as 10:46:
40 and the code that executes immediately after this (unix chmod command) fails because it thinks the file isn't there (this next command also executes at 10:46:39).
This only happens occasionally, so I think this is some sort of timing issue. The code currently outputs the file to /default/main... Based on past experience I am worried that this is causing the timing issue as it tries to read/write to the cached /iwmnt point which is where /default is symbolically linked to. Shouldn't this code be reading/writing into /.iwmnt or is there something else?