diff options
| author | Eric S. Raymond <esr@thyrsus.com> | 2000-02-01 00:00:02 +0000 | 
|---|---|---|
| committer | Eric S. Raymond <esr@thyrsus.com> | 2000-02-01 00:00:02 +0000 | 
| commit | dc23eaf3310218404301a5e5df00bd303de0bde7 (patch) | |
| tree | 94da3ae9abf62c10160e9f417b264cb65ab7d206 /fetchmail.c | |
| parent | 6ae74f9b7a1ec9170efa53cab74e889eb1697a50 (diff) | |
| download | fetchmail-dc23eaf3310218404301a5e5df00bd303de0bde7.tar.gz fetchmail-dc23eaf3310218404301a5e5df00bd303de0bde7.tar.bz2 fetchmail-dc23eaf3310218404301a5e5df00bd303de0bde7.zip | |
Debian buglist cleanup.
svn path=/trunk/; revision=2727
Diffstat (limited to 'fetchmail.c')
| -rw-r--r-- | fetchmail.c | 5 | 
1 files changed, 3 insertions, 2 deletions
| diff --git a/fetchmail.c b/fetchmail.c index c6b2e72f..27054b1d 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -574,7 +574,8 @@ int main(int argc, char **argv)      signal(SIGQUIT, terminate_run);      /* here's the exclusion lock */ -    if ((st = open(lockfile, O_WRONLY | O_CREAT | O_EXCL, 0666)) != -1) { +    if ((st = open(lockfile, O_WRONLY|O_CREAT|O_EXCL|O_SYNC, 0666)) != -1) +    {  	sprintf(tmpbuf,"%d", getpid());  	write(st, tmpbuf, strlen(tmpbuf));  	if (run.poll_interval) @@ -582,7 +583,7 @@ int main(int argc, char **argv)  	    sprintf(tmpbuf," %d", run.poll_interval);  	    write(st, tmpbuf, strlen(tmpbuf));  	} -	close(st);	/* should be safe, previous write was atomic */ +	close(st);	/* should be safe, fd was opened with O_SYNC */  	lock_acquired = TRUE;      } | 
