Hello,
I am wondering, can I detach a pthread from a main function? Let`s say: I have a simple UI interface, that terminates after a button click, but it starts a pthread which performs a logging in a file, but the destruction of the UI comes before the thread, and the thread must remain running in the background, like it was forked? The algorithm is simple - press button, destroy UI, init a background thread. Is it possible with pthreads and if - how to achieve it.
P.S. pthread_detach() does not work that way.