From owner-freebsd-ports Tue May 8 8: 0:28 2001 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id F1DA637B42C for ; Tue, 8 May 2001 08:00:11 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f48F0B549563; Tue, 8 May 2001 08:00:11 -0700 (PDT) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 88D7F37B423 for ; Tue, 8 May 2001 07:51:29 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f48EpTC48400; Tue, 8 May 2001 07:51:29 -0700 (PDT) (envelope-from nobody) Message-Id: <200105081451.f48EpTC48400@freefall.freebsd.org> Date: Tue, 8 May 2001 07:51:29 -0700 (PDT) From: conrad@th.physik.uni-bonn.de To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: ports/27202: mail/pine sucks rocks when saving over NFS mounts Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 27202 >Category: ports >Synopsis: mail/pine sucks rocks when saving over NFS mounts >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue May 08 08:00:11 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Jan Conrad >Release: FreeBSD4.3R >Organization: Univ. Bonn, Germany >Environment: does'nt matter >Description: pine writes out attachments/mailboxes in 512 byte chunks >How-To-Repeat: On an NFS mounted home go to a 2MB attachment and type (S)ave Then walk over to your file server and listen how your disks go wild! If you don't believe it, do a ktrace... :-) >Fix: The following fixes only non mailbox saves (I'll send another PR for cclient) Of course one could do that in a nicer way, but I already spent a lot of time to find that out... diff -ruN pine/filter.c.orig pine/filter.c --- pine/filter.c.orig Fri Dec 29 00:34:07 2000 +++ pine/filter.c Tue May 8 16:41:00 2001 @@ -288,8 +288,14 @@ /* * Use open instead of fopen so we can make temp files private. */ - return(((fd = open(so->name, flags, mode)) >= 0) - ? (so->txt = (void *) fdopen(fd, type)) : NULL); + + if ((fd = open(so->name, flags, mode)) >= 0) { + so->txt = (void *) fdopen(fd, type); + setvbuf (so->txt, NULL, _IOFBF, 32*1024); + return (so->txt); + } else { + return (NULL); + }; } >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message