Re: wxAppConsole and fork
Christian Kristukat <[email protected]>
| Newsgroups | gmane.comp.lib.wxwindows.general |
|---|---|
| Message-ID | <CAGFw7pHYkC-Nk93Mz1NizpctcyFb9Lot-Yi9GGpHJEsc9vhk7w@mail.gmail.com> |
Have a look at wxTimer Сергей Коныгин <[email protected]> schrieb am So., 23. Juni 2024, 16:40: > Thanks, it works! > One more question: how can I made my own MainLoop in wxMyAppConsole that > process events and constantly calls a some function like DoStep. My server > must work with the socket and at the same time do some iterations of > calculation. A new thread is not good idea. > суббота, 22 июня 2024 г. в 18:09:12 UTC+4, Vadim Zeitlin: > >> On Fri, 21 Jun 2024 23:21:17 -0700 (PDT) Сергей Коныгин wrote: >> >> > I'm writing a simple linux daemon using wxAppConsole. Linux daemons >> usually >> > use fork function for creating a child process. Can I use fork in >> OnInit() >> > function? Is there an another way to create the child process and exit? >> >> You should be able to use fork(), after all wxExecute() does it (see its >> code in src/unix/utilsunx.cpp) and using it in OnInit() works fine, >> AFAIK. >> >> Or you could also use wxIMPLEMENT_APP_NO_MAIN() and provide your own >> main() which would fork first, before calling wxEntry() from the branch >> which needs to use wx. Read the documentation of >> wxDISABLE_DEBUG_SUPPORT() >> macro if you do this. >> >> Regards, >> VZ >> >> -- >> TT-Solutions: wxWidgets consultancy and technical support >> https://www.tt-solutions.com/ >> > -- > Please read https://www.wxwidgets.org/support/mlhowto.htm before posting. > --- > You received this message because you are subscribed to the Google Groups > "wx-users" 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/wx-users/94f93aeb-b4e4-4df6-b67e-dd5409b8c3cen%40googlegroups.com > <https://groups.google.com/d/msgid/wx-users/94f93aeb-b4e4-4df6-b67e-dd5409b8c3cen%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Please read https://www.wxwidgets.org/support/mlhowto.htm before posting. --- You received this message because you are subscribed to the Google Groups "wx-users" 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/wx-users/CAGFw7pHYkC-Nk93Mz1NizpctcyFb9Lot-Yi9GGpHJEsc9vhk7w%40mail.gmail.com.