Re: [Exim] Where is the bug?

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Philip Hazel
Date:  
À: Joe Doehler
CC: exim-users
Sujet: Re: [Exim] Where is the bug?
On Fri, 5 Sep 2003, Joe Doehler wrote:

> This is a code snippet that is supposed to save some text in a file. The
> code will become part of a larger "local_scan.c" routine.


If you are going to write multiple lines, and you want them to stay
together your file, I hope you have thought about locking.

The duplication is a complete mystery. The code looks unexceptional. Try
getting it to write the process id as well, just to see if it *is* the
same process. Maybe a timestamp too.

Oh, wait, I've spotted the bug:

>      close(fp);


That should be fclose(). Entertaining bug!


--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book