in reply to Problem writing to file from a daemon
I solved the problem quite simply. First, I read the fscking manual a third time and I noticed that while I was autoflushing the buffer on STDOUT, I wasn't flushing the buffer on the filehandle.
I fixed this by using autoflush on the filehandle:
If you make something idiot-proof, eventually someone will make a better idiot.open (LOGFILE, ">tempLog.$time" ) || die "Cannot open tempLog for writ +ing: $!\n"; autoflush LOGFILE 1; print LOGFILE "Socket server started on port $port at ", localtime, "\ +n";
|
|---|