Timothy Grant wrote: > Hi all, > > I have a function that daemonizes itself. When called in a > command line environment everything works the way I would like > it to--It detaches itself from the console and runs in the > background until killed. However, when called from a button > in a GUI, things quickly get beyond my understanding of what's > going on. > > When I call the same function from a button in Tkinter, the > programme still detaches itself from the console, an as > expected, but not welcomed, the GUI quits functioning until I > kill the process. > > So, How do I call a process that going to be a daemon, and yet > maintain control of my GUI? This all depends on what exactly you're doing with the GUI. Is it a configurator/launcher, a controller, what? If the former then use one of the spawn functions from os. If the latter, then you can start the process via the same method for the former option and then either write a config file and have your daemon respond to SIGHUP (or some other signal) so it rereads the config file and changes behavior, or communicate with it via a socket and custom API to tell it what to change. Coy Krill
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4