Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site watrose.UUCP Path: utzoo!watmath!watrose!dmmartindale From: dmmartindale@watrose.UUCP (Dave Martindale) Newsgroups: net.unix-wizards Subject: re:pipes and atomic writes Message-ID: <128@watrose.UUCP> Date: Sun, 18-Dec-83 04:45:08 EST Article-I.D.: watrose.128 Posted: Sun Dec 18 04:45:08 1983 Date-Received: Sun, 18-Dec-83 05:46:12 EST References: <2942@utcsrgv.UUCP> Organization: U of Waterloo, Ontario Lines: 12 From: mason@utcsrgv.UUCP (Dave Mason) According to pipe(2) 'writes with count <4097 are atomic..'... What happens if they cross a page boundary and the new page is not currently resident on 4.2? Will it still be atomic? Seems difficult to me unless they specifically check & force pages resident before starting the copy. No, all that is necessary is that the inode of the pipe remain locked during the entire copying process, including any page faults that occur. If this is done, any other process which also wants to write to the pipe will simply sleep until it can manage to lock the inode for itself.