I’ve re-implemented the app using an NSTaskMBS rather than the ShellMBS and it does the same thing. If I force quit the child processes everything is fine. They release their sockets. If I force quit the parent app then any ports they had listening are no longer available until the machine restarts. Do these shells not get the proper signals passed through if the parent process receives a signal? Is that something I need to do manually in a signal handler? Can I even do that if my app crashes or is force quit? I’m not sure what to do about that yet but will keep futzing around ;)
> On Nov 18, 2020, at 7:30 AM, James Sentman <[email protected]> wrote: > > My second issue is a bit stranger ;) If the parent app crashes, or needs to > be force quit, the shell processes that have sockets open never close them. > The remote devices they are connected to never realize they have gone away > and if they are listening sockets those are never released. Even hours later > they are still not available. The processes themselves are not stuck running, > or at least they don’t show up in the Activity Monitor. When using the > regular Xojo shell class if the program crashes it can be restarted > immediately and everything reconnects just as if the sockets were closed > properly. Is there something different about how the system manages shutting > down the shell processes with ShellMBS vs the xojo shell? I have to restart > the entire machine before I can create another instance of them listening on > a specific port and I definitely do not have to do that with the xojo shell. > I’m not sure how to work around that. Of course the app shouldn’t crash ;) > But thats not 100% possible to guarantee ;) The parent app is launched by > launchd so it happily restarts where it left off when it happens, but using > ShellMBS almost nothing works after it does so. Thanks, James James Sentman http://www.PlanetaryGear.org http://MacHomeAutomation.com _______________________________________________ [email protected] mailing list %(list_address)s https://ml-cgn08.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info
