Re: [DNG] Doing away with multi-threading in my project (netman)

2015-09-04 Thread Rainer Weikusat
Edward Bartolo writes: > Hi, > > For the last days I have been struggling to reap zombies adopted by > the frontend with only failures. The frontend doesn't adopt zombies. Only init ever does that. > I tried several methods using wait(-1), waidpid and trapping the > signal when a child dies wi

Re: [DNG] Doing away with multi-threading in my project (netman)

2015-09-04 Thread Edward Bartolo
A periodic algorithm is now implemented in the frontend to search for backend and any spawned children for ownership by root. This most probably was what was causing waitpid and wait to fail to reap zombies. If the algorithm find a root process parented by the frontend, it will disable 'connect' an

Re: [DNG] Doing away with multi-threading in my project (netman)

2015-09-04 Thread Edward Bartolo
Oooop, the algorithm is not periodic, but is used whenever the user clicks connect and disconnect. Other operations can also be included. On 04/09/2015, Edward Bartolo wrote: > A periodic algorithm is now implemented in the frontend to search for > backend and any spawned children for ownership b

Re: [DNG] Doing away with multi-threading in my project (netman)

2015-09-04 Thread Rainer Weikusat
Edward Bartolo writes: > A periodic algorithm is now implemented in the frontend to search for > backend and any spawned children for ownership by root. This most > probably was what was causing waitpid and wait to fail to reap > zombies. It can't. As an experiment, copy the id program to /tmp an

Re: [DNG] netman GIT project

2015-09-04 Thread Edward Bartolo
I will use command line parameters for the GUI frontend so that it may be started to automatically scan for available wifis and connections and to automatically select the best connection if that is configured. So, there is no need of using /etc for further configuration. netman auto-connect Will

Re: [DNG] Doing away with multi-threading in my project (netman)

2015-09-04 Thread Edward Bartolo
I am not putting in doubt what you are telling me. In my implementation, the backend is run from within the code of the frontend, so its ppid is the pid of the frontend. Occurrences of execl, create another child process which is owned by the backend, but the latter, dies as soon as the child proce