On Fri, Oct 17, 2014 at 2:56 AM, Erwin Waterlander
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. ;)
Broadcasted terminals (see terminator broadcast). Slight human error can make you broadcast to the same server, and kaputt. Cronjobs, using wcd inside a cron is probably not a very good idea, but someone might think it dandy to not have to type the whole path, and then you can run into trouble (not only the race condition of course, but it would be possible for wcd to race another wcd for sure). In any case, using the user alone is a poor choice when you have the shell's PID. Use that, it takes almost no effort. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org