Scrivener07 / FO4-Papyrus-Terminal

A terminal with advanced Papyrus support, by niston. This codebase is a stale fork of niston's repository.
https://github.com/niston/PapyrusTerminal
2 stars 2 forks source link

Kill runaway Holotape BIOS scripts when a "while" has no terminating condition for Terminal close. #5

Open Scrivener07 opened 3 years ago

Scrivener07 commented 3 years ago

Kill runaway Holotape BIOS scripts when a "while" has no terminating condition for Terminal close.

niston

ok so, a terminal program will essentially be the terminal.swf on a holotape. the holotape will also have at least one papyrus script attached now the holotape runs, the papyrus gets executed if the papyrus goes into a while loop and does not check the new TerminalShutdown property and does not handle the shutdown event the terminal will close on Ctrl-C or TAB BUT the script will keep executing and the next time you run that holotape it'll do the same and the next time, moar of the same until the script engine dies from overload

so its essential to handle the event or check the property if you have a while loop but if you forget you can fuck user save we should prevent that if possible by killing dead any running script instance we can execute console commands from the terminal swf, so I figured if there's a command to forcibly terminate or unload a script the terminal could kill BIOS.psc and any descendants perhaps somehow anyhow

Scrivener07 commented 3 years ago

Reproduce the problem in a new Example00.psc.