Menu

#784 possible error condition when port in use

open
comm (23)
5
2006-02-24
2006-02-24
Alex
No

In line 632, there is a possible error condition with
the command "rename $chan {}".

I've run into a case (with a user-defined port and
channel) in which the user-defined port is in use (by
an outside application), but the channel doesn't exist.
In this case, the "rename $chan {}" errors out:
can't delete "::test": command doesn't exist.

But the real error should be that the port is already
in use (line 634).

This can be fixed by verifying that the channel exists
before trying to do a rename (in line 631 for example).

Discussion