On Sat, Jun 01, 2024 at 03:18:37PM +0800, Qian Yun wrote: > This patch is to fix https://github.com/fricas/fricas/issues/170, > aka when quitting FriCAS, the HyperDoc started by ")hd" should > exit properly. > > "viewman" started by ")startGraphics" can exit properly, > see src/graph/viewman/viewman.c line 188: > > viewType = get_int(spadSock); > if (viewType == -1) goodbye(-1); > > The key here is to detect SpadServer shutdown. > HyperDoc didn't do this check. > > Another issue recently discovered by Greg is that > HyperDoc can exit only after mouse passes it. > > That's because when you enter a line to FRICASsys, > a SIGUSR2 signal is sent to HyperDoc indicating "EndOfOutput". > This signal will cause system call "select" to fail. > The correct thing to do is using "sselect" to restart > this system call, instead of letting it fail silently. > (Just like what sman.c and seesion.c did.)
Seem to work OK. > BTW, "$PageStuff in hypertex.boot" is recently removed, > so C function "get_new_window" can be removed as well? Well, there are several commands in HyperDoc protocol that are currently unused. Some may be obsolte now, bit most were meant to be used from Spad code. I started rewrite of Hyperdoc part in FRICASsys in Spad (currently I have version where about 10% of code is in Spad and 90% in Boot). In the process I removed some unused code including '$PageStuff'. -- Waldek Hebisch -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/Zltbh0uTpBDdwgnq%40fricas.org.