Sh() has a chance of completely freezing KLWP

I have several formulas that make use of the sh() command. They call route print, ifconfig and cat regularly to check whether the VPN connection and SSH tunnel are active, and to read and store data from/to files.

The more commands I add, the more the chance to have KLWP frozen because of sh() (be it opening the Advanced Editor, editing the formula or just viewing the item which has the sh() function, causing it to update). I've been locked out of my design once, unable to even load it and edit. This is a really powerful command and I'd like it do be reliable.

I must note, it does not depend on which command is called. It can be something as simple as date (thus, the app may even freeze after just clicking on the "sh" block in the formulas directory, because the examples there trigger sh() two times).

The debug logs just say "executing [command]", and silence after that. I have to kill the app to get back to the editor.

Hi Eugene, can you attach a non working setup here? Something i can debug? Or you can send it via email at (i need something that can work on my devices so it must be a bit generic)

Sure! Sent you an email.

Device: Highscreen Boost III, AOSP 6.0. Rooted, latest xposed installed.

Launcher: Nova Prime.

This is fixed in 3.23, sh() will not block the UI anymore, it will run in background and also show standard error in case the command fails (editor only)

*internet hug*