Op 17-10-2014 0:39 Yamaban schreef:
On Fri, 17 Oct 2014 00:25, waterlan
wrote: Jan Engelhardt schreef op 2014-10-16 13:28:
I have created a new package wcd for openSUSE. Wcd is a shell utility to change directory fast on the command line.
The "wcd" function is prone to race conditions because all invocations use the same file.
No. Every user has its own 'go script'. And a user will not type the wcd command twice at the same time.
Playing Devils' Advocat: O'rly? Multiple xterms?
With two keyboards, and four hands? Perhaps the devil can do that, but I can't. ;)
To get sure of at least that, you would have to use either the $PPID, or the tty/pty-id to differate that.
That raises the question, why use a file at all? At least on Linux where pipes properly work and ttys exist, there is no need for additional temporary files.
A file works fine. See above.
It's not about raining onto your parade, it's about pointing out potential problems. Better get answers to that now than later.
First I have to see the problem. In 17 years I have not seen a race condition problem, nor did I get a report. I have used it on many systems, at home and in industry. But I'm always open for improvements. Patches are welcome.
About the name, I would speak it "We-CD" and CD like in Compact-Disc.
Also good. best regards, -- Erwin Waterlander http://waterlan.home.xs4all.nl/ -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org