Enable stdio forwarding when nonstop mode is enabled, and disable it
once it is disabled. This makes it possible to cleanly handle stdio
forwarding while running multiple processes in non-stop mode.
Sponsored by: The FreeBSD Foundation
Differential D128932
[lldb] [llgs] Improve stdio forwarding in multiprocess+nonstop mgorny on Jun 30 2022, 11:26 AM. Authored by
Details Enable stdio forwarding when nonstop mode is enabled, and disable it Sponsored by: The FreeBSD Foundation
Diff Detail Event Timeline
Comment Actions Use semaphores to sync instead of relying on ugly sleeps.
Comment Actions I have a feeling the semaphores will not work (compile) on darwin. I didn't find any sem_init call there -- just sem_open. Maybe instead of semaphores we could use files for the synchronization? Something similar to the wait_for_file_on_target function, just in the other direction. Then the test could create a file to move the processes forward? (This might be easier to achieve with a dedicated inferior, instead of trying to fit it into the universal LLGS inferior.)
Comment Actions Damn, and I thought POSIX actually means something to Darwin. Yeah, I'll look into using some other synchronization mechanism.
Comment Actions Ok, let's give this a shot.
Comment Actions Flake here: https://lab.llvm.org/buildbot/#/builders/68/builds/36967. Presumably the same problem that cd18e2ea3f4e87f8804a7d6661d5596ef1f07b81 fixed for TestNonStop. Comment Actions Thanks for the ping and the suggestion. I'm testing a fix right now and will push if it works ;-). |
In the multiprocess all-stop mode, if one process stops, we are supposed to stop all of them, right? I take it that's not something we do right now, is it?