From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,7b1af84fde7bd421,start X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1993-04-28 10:38:07 PST Newsgroups: comp.unix.osf.osf1 Path: gmd.de!newsserver.jvnc.net!howland.reston.ans.net!usc!elroy.jpl.nasa.gov!ucla-cs!twinsun!eggert From: eggert@twinsun.com (Paul Eggert) Subject: patch for RCS to work around OSF/1 bug Message-ID: Sender: usenet@twinsun.com Nntp-Posting-Host: bi Organization: Twin Sun Inc, El Segundo, CA, USA Date: Wed, 28 Apr 1993 16:10:53 GMT A user reports that an OSF/1 bug breaks the Revision Control System (RCS). Here's the bug: if you have a stdio file descriptor open into a file, fork and exec a process that opens and reads the same file, and then reposition the file with fseek, fseek sometimes get confused and repositions to the wrong location. The bug is still present in OSF BL12. I don't have access to an OSF/1 host (I don't even know what OSF BL12 is) so I'm just passing this along. The user reports that the following hacky patch to RCS works around the bug by turning off buffering in the affected files. *** ci.c --- *************** *** 537,545 **** eerror(workfilename); continue; } - #ifdef OSF1 - setbuf(workptr,NULL); - #endif if (finptr && !checkaccesslist()) continue; /* give up */ krev = rev; --- 537,542 ---- *** rcslex.c --- *************** *** 239,247 **** nerror = 0; if (finptr) { - #ifdef OSF1 - setbuf(finptr,NULL); - #endif foutptr = 0; hshenter = true; ignored_phrases = false; --- 239,244 ----