There is kind of an involved way in C that is how it is done (similar to how Apache runs as a long-running daemon).
What you do is you fork() with the parameters set up such that it invokes a daughter shell process that survives after the parent process is terminated. The reason why the daughter process is shell, is so you can just call your python interpreter inside it. Even though it uses two languages, it is how its done for a stable service-type daemon. I'll check back if there is any interest in seeing my C code for how to do this (I wrote something a little while ago that required this approach, so I have the source on hand and its all ANSI posix-compliant C with no external libraries). On Tuesday, December 27, 2016 at 10:32:46 AM UTC-7, Denis Cosmin wrote: > > > Hello, > > I use the BBB to turn on my christmas light using a simple relay circuit. > I made a simple server in python that listens to post requests, so far it > works, I also use Microsoft Cognitive Services to send post requests based > on speech commands. > When I start up the python server: nohup python3 server.py & everything > works fine while I am connected to the BBB over ssh but when I leave the > server stops working. > > Could you please give me some advice on how to keep python3 server running > after I disconnect from ssh? > > -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/8216e367-063b-4978-b9f7-ec64df5aabe8%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
