On Oct 2, 6:59pm, Roger Leigh wrote: > The special-casing of ttys looks particularly borked:
Not to me. > if ( strcmp( p, "tty") == 0 ) > p = ttyname( 0); /* this terminal, if it exists */ > > What has the ttyname of the controlling terminal got to do with > locking any other device /dev/tty*? The call could also potentially It's not locking "any other device /dev/tty*". It's locking /dev/tty (it's strcmp, not strncmp). /dev/tty is by definition current terminal. DOing a lock on /dev/tty instead of terminal's real name would effectively lock all processes from using their working terminals (whatever for?) and allow them to write to the terminal that was supposed to be locked at the same time. Not quite what it's supposed to do. Pawel -- (___) | Pawel Wiecek ----------------- Coven / Svart --------------------- | < o o > | http://www.coven.vmh.net/ <[EMAIL PROTECTED]> GSM: +48603240006 | \ ^ / | GPG/PGP info in message headers * [ Debian GNU/Linux developer ] | (") | * * * * 18 is actually 9. * * -- KD | -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]