From: Marc C. <cul...@gm...> - 2025-08-16 12:18:00
|
Apple does provide IPC mechanisms. I don't know whether they would be suitable, but I am pretty sure they would. However, the current implementation of [send] does not attempt to use them. If you look at the top of macosx/TkMacOSXSend.c you will see this very old comment (note that "gestalts" no longer exist in macOS): * This file provides procedures that implement the "send" command, * allowing commands to be passed from interpreter to interpreter. This * current implementation for the Mac has most functionality stubbed out. * * The current plan, which we have not had time to implement, is for the * first Wish app to create a gestalt of type 'WIsH'. This gestalt will * point to a table, in system memory, of Tk apps. Each Tk app, when it * starts up, will register their name, and process ID, in this table. * This will allow us to implement "tk appname". * * Then the send command will look up the process id of the target app in * this table, and send an AppleEvent to that process. The AppleEvent * handler is much like the do script handler, except that you have to * specify the name of the tk app as well, since there may be many * interps in one wish app, and you need to send it to the right one. * * Implementing this has been on our list of things to do, but what with * the demise of Tcl at Sun, and the lack of resources at Scriptics it * may not get done for awhile. So this sketch is offered for the brave * to attempt if they need the functionality... - Marc On Sat, Aug 16, 2025 at 1:17 AM Donal Fellows < don...@ma...> wrote: > I would be very startled if it *isn't* the exact same issue, a > combination of needing a suitable IPC mechanism for doing the discovery and > communications, and system policy restricting access to such things even if > they exist. > > Donal. > > ------------------------------ > *From:* Erik Leunissen via Tcl-Core <tcl...@li...> > *Sent:* Saturday, August 16, 2025 07:12 > *To:* Marc Culler <cul...@gm...> > *Cc:* tcl...@li... <tcl...@li...> > *Subject:* Re: [TCLCORE] Advice requested regarding [send] on macOS > > Related to this matter: I noticed (in a debug statement issued by me for > execution at Github) that > interpreters in another process are not returned by [winfo interps] on > macOS. (See the script below > to verify that). I'm suspecting that this is for the > very same reason/cause. Can you please give your view about that > (confirm/deny if > possible) ? > > |