From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Tue, 10 Feb 1998 08:59:14 +0000 From: forsyth@caldo.demon.co.uk forsyth@caldo.demon.co.uk Subject: [9fans] create(2)/open(2) race for file creation Topicbox-Message-UUID: 7243c4c8-eac8-11e9-9e20-41e7f4b1d025 Message-ID: <19980210085914.g8qCDhAM_Z1j5U9xfmXHOIDBn9aEEJamMct3IKZHvwY@z> i'm not sure i follow this. in order to simplify one application that purportedly has unusual needs, it is proposed as a sensible action, and even dignified by reference to `research', to rush to change a fundamental interface for dozens of other programs (more if you include the ones gdb hasn't seen). even then i wasn't sure i could understand the timing restrictions accurately that prevented use of CHEXCL -- it seemed the race was built into that application more than the kernel! but i hadn't time to pursue it this week. it's even more surprising, because (if one were to accept the underlying assumptions, which as yet i don't), gdb himself proposed an alternative solution by a flag to open (or something) that didn't require as much messing about, isolated the change and allowed me to ignore the whole matter for the moment! i recall a caustic comment made by a friend of mine when someone from the CSRG included things such as `increasing dev_t to 64 bits' on a 1987 slide describing `research' they were undertaking with Unix. i'd concluded from that talk that clever people can still be tempted just to prat about with trivial things, and even then without THINKING. if i were truly exercised by its existence, i might consider removing the race in the implementation of the system call (in port/chan.c). in practice, i'd probably think a little bit about the implications of that, and then decide against bothering to do even that. in a distributed system with processes concurrently creating and destroying names, especially in the presence of union mounts (where it isn't possible in general to rendezvous at a shared file server because there isn't guaranteed to be a unique one), some form of name-race is a fact of life, and one might as well look to other mechanisms for a solution to general synchronisation problems. it's not even worth a reference to the Race Relations Board.