Tk Source Code

View Ticket
Login
Ticket UUID: 9ba9729ef1b5ef6ead755f2d72656743bbb26832
Title: Limitation of [send] and [winfo interps] on macOS is not reflected documentation, and tests exhibit shortcomings
Type: Bug Version: 9.1a0
Submitter: erikleunissen Created on: 2025-08-16 05:39:24
Subsystem: 99. Other Assigned To: nobody
Priority: 5 Medium Severity: Important
Status: Open Last Modified: 2025-08-16 10:45:40
Resolution: None Closed By: nobody
    Closed on:
Description:
On macOS, communicating with other interpreters using the send command is
limited to interpreters within the same process. This limitation is not mentioned
in the manual page for "send".

Also, some tests in the test file "send.test" involve interpreters in other
processes. Some of these tests are skipped for aqua, but not all, notably
send-8.18 and send-8.19.

A probably related limitation holds for [winfo interps]. Under macOS, this command
does not list interpreters in another process. As is the case with [send], this
limitation is not mentioned in the docs. Furthermore, the test file "winfo.test"
doesn't contain any tests that exercise multiple interpreters, whether in the same
process or not, taking into account the different behaviour on macOS compared
to that on other unix derivatives.

See also the post to the TCLCORE mailing list on 15-aug-2025 with subject
"Advice requested regarding [send] on macOS".
User Comments: erikleunissen added on 2025-08-16 10:45:40:
The changes that I intended with this ticket are done.
I'm welcoming review of the development branch bug-9ba9729ef1.

erikleunissen added on 2025-08-16 10:13:20:
Tests in winfo.test with multiple interpreters (in the same process and in
different processes) have been added. See commit [c8bf1bce91].

erikleunissen added on 2025-08-16 10:10:41:
Tests in send.test targetting interpreters in another process have now been
constrained with "notAqua". See commits [1f3dbb47af] and [95d7944f15].

erikleunissen added on 2025-08-16 08:00:39:
New text proposals for man winfo (winfo interps) and man send
-------------------------------------------------------------

Man winfo, current text "winfo interps"
--
Returns a list whose members are the names of all Tcl interpreters (e.g. all Tk-based
applications) currently registered for a particular display. If the -displayof option
is given then the return value refers to the display of window; otherwise it refers
to the display of the application's main window.
--

Proposed new text
--
Returns a list whose members are the names of all Tcl interpreters (e.g. all Tk-based
applications) currently registered for a particular display. If the -displayof option
is given then the return value refers to the display of window; otherwise it refers
to the display of the application's main window.

Under macOS/aqua, the command returns only the interpreters that exist in the same process
as the current interpreter.
--


Man send, proposal to add a section "LIMITATIONS"
-------------------------------------------------

Proposed text for section LIMITATIONS:
--
Under macOS/aqua, the send command works only with interpreters that exist in
the same process (these are returned by "winfo interps"). Invocations that
target an interpreter that exists in another process return an empty string
without accomplishing anything; no error is returned.
--

The proposed changes have been committed in bug-fix branch bug-9ba9729ef1,
commit [731a5957cc].