Quitting SharedUnixLibrary
Rick Murray (539) 13840 posts |
Given that things crash, it would be nice if SharedUnixLibrary had a command to say “nope, nobody is using this any more” so it could be quit, especially if something else wants a newer version and you’ve not remembered to drop the newer one into !System. Ugly jumping through hoops like a drunken dolphin to raise a wry smile on this Saturday evening (well, it beats watching Pointless Celebrities – all celebrities are pointless!). *RMKill SharedUnixLibrary There are still SharedUnixLibrary clients active *BASIC ARM BBC BASIC V (C) Acorn 1989 Starting with 20443388 bytes free >SYS "SharedUnixLibrary_Count" TO c% >PRINT c% 1 >*Modules No. Position Workspace Name [...snip...] 173 204146B4 00000000 OvationUtils 174 205518F4 00000000 Ovation 175 2055D754 203DFCB4 SharedUnixLibrary 176 2056CB54 2050A294 ZapTaskWindow 177 205702F4 5C9C5014 LineEditor [...snip...] 198 205A4354 20414E14 ZapObey >*MemoryA 2055DA34 + 2055DA34 : ..0ã : E3300000 : TEQ R0,#0 Enter new value : E1A00000 . E1A00000 + 2055DA34 : .. á : E1A00000 : MOV R0,R0 Enter new value : + 2055DA38 : .... : 1A000003 : BNE &2055DA4C Enter new value : E1A00000 . E1A00000 + 2055DA38 : .. á : E1A00000 : MOV R0,R0 Enter new value : + 2055DA3C : .. ã : E3A00007 : MOV R0,#7 Enter new value : Escape >*RMKill SharedUnixLibrary >QUIT * Addresses determined by extracting the module using Zap, going to the finalise code, and then setting the module base address to that shown in the module list (&2055D754). |
Theo Markettos (89) 919 posts |
You’re disabling the code marked ‘Only allow exit if there are no claimants’, line 394, which checks that a ‘number of claimants’ counter is zero: If things crash, the SUL upcall handler is still registered so killing the module is going to leave the handler dangling in unallocated memory. If the handler gets overwritten, the next time it’s called the machine will likely crash. |
Rick Murray (539) 13840 posts |
Could explain why it later did. ;) Really, something that allows clients to register with it should allow the user to forcibly unregister. I mean, it isn’t as if NetSurf (etc) never crashes… |