> From: Aneurin Price [mailto:[email protected]] > > I don't know about pure/POSIX shell, but at least bash and ksh support > noclobber, which should do the trick. I've been using the following > idiom for some time without problems:
I read somewhere (possibly obsolete, and also can't relocate) that noclobber on solaris doesn't always work right. And in any event, I don't see the advantage of using noclobber on a file, versus using mkdir. (Mkdir has the advantage of definitely being atomic, regardless of platform.) Either way, you could still have stale locks left around (even with trap), after a "kill -KILL" or a kernel, storage, or power failure. It would be *really* nice to have a locking mechanism that exists solely in ram, so it would go away and automatically release locks, in the event of a system ungraceful reboot. _______________________________________________ OpenIndiana-discuss mailing list [email protected] http://openindiana.org/mailman/listinfo/openindiana-discuss
