I have a problem with one of my apps. The Raspberry Pi is in England, I am in Phoenix. I want to run the console app so that I can read the ‘print’ commands in an effort to debug.
I know how to run the app from a terminal, but I never get the ‘window’ to read the print statements (I have them in there to try to find the problem).
you need to double click the app and select “execute in terminal” and the app needs to remain running (with a doevents loop) for it to print something.
The “print” function should be enough to output to stdout.
I think that once daemonized, your app is detached from the tty (console) so prints vanish. Your app goes “background” but still belongs to your shell session. When you “click” the app to fire it, a shell session starts to contain it; once daemonized , its tty is detached and the app gets “mute”, and the shell “continues” (not waiting for stdin nor outputting to stdout). In such mode, continuing means run the next task, and such “next”, does not exist so such shell session ends, and ending such shell session means ending its current tasks, even a hidden one.
I wrote all that just reminding things without tests. But I think that maybe it’s what’s happening to you.
“Daemonize” in Xojo demands better docs.
There’s a difference firing ./myapp
and ./myapp &
The second one detaches your app from the shell session so it continues after the shell session end.
I wish I could do some tests, but have no time now. If someone could, I’m really curious about “daemonized” Xojo apps behavior.