desed
desed copied to clipboard
Add timeout to sed, aborting if it takes too long and guessing where the infinite loop might be
When one makes an error in script and loads it with desed or presses l
to reload source code, and the sed script makes sed enter infinite loop, desed hangs and trusts sed to actually exit. We shouldn't assume everything will be ok and after a while just exit with an error. It would be great if we could actually try to guess where did sed loop so we can point user at that.
One way: if we loaded output from sed asynchronously, we could just stop reading after n
states. This would also enable user to nicely debug where and why is the infinite loop there. It would be best if we could add way to send warnings from debugger straight to TUI, so we can warn user that full sed state wasn't loaded, probably due to infinite loop.