From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23864 invoked from network); 25 May 1999 12:17:17 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 25 May 1999 12:17:17 -0000 Received: (qmail 22088 invoked by alias); 25 May 1999 12:17:02 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6346 Received: (qmail 22074 invoked from network); 25 May 1999 12:17:02 -0000 Message-Id: <9905251149.AA23629@ibmth.df.unipi.it> To: zsh-workers@sunsite.auc.dk (Zsh hackers list) Subject: PATCH: pws-19: mapfile bit that just sort of disappeared In-Reply-To: "Peter Stephenson"'s message of "Tue, 25 May 1999 12:01:10 DFT." <9905251001.AA28774@ibmth.df.unipi.it> Date: Tue, 25 May 1999 13:49:27 +0200 From: Peter Stephenson Peter Stephenson wrote: > By the way, it looks like mapfile using mmap() doesn't write the file > properly on HPUX, probably the file doesn't get extended properly first. > I'll have to look at that. No real wonder. This was there at some stage, though. --- Src/Modules/mapfile.c.ms Sat May 22 17:05:15 1999 +++ Src/Modules/mapfile.c Tue May 25 13:40:47 1999 @@ -143,6 +143,7 @@ */ ftruncate(fd, len); memcpy(mmptr, value, len); + msync(mmptr, len, MS_SYNC); /* * Then we need to truncate again, since mmap() always maps complete * pages. Honestly, I tried it without, and you need both. -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy