Shell Handler no Data returned

Good morning

Cleaning up my code form my FPGA IDE so I’m starting to use AddHandler for shell commands like:

Var sh As New Shell

sh.ExecuteMode = Shell.ExecuteModes.Interactive

AddHandler sh.Completed, AddressOf ShellComplete
AddHandler sh.DataAvailable, AddressOf ShellData

sh.Execute("ls")

TextArea1.AddText("Shell started")

The ShellComplete Method is fired fine:

TextArea1.AddText(EndOfLine + "Shell Command Completed...")
Though strangely I see a SIGHUP Exit Code (129)

But in my ShellData method I can’t read any data as this method is never fired:

TextArea1.AddText(EndOfLine + sender.ReadAll)

And ShellComplete reports an exit code of 129 (SIGHUP).

What am I missing here on an early Sunday morning? (o;

Ah got it (o;

Needs a property as otherwise the shell is gone before…

MyShell = New Shell

MyShell.ExecuteMode = Shell.ExecuteModes.Interactive

AddHandler MyShell.Completed, AddressOf ShellComplete
AddHandler MyShell.DataAvailable, AddressOf ShellData

MyShell.Execute("/opt/homebrew/bin/python3 /Users/klingler/Develop/Xojo/IDEal/test.py")

TextArea1.AddText("Shell started")