Re: [DNG] BUG: zombies increase while running netman

2015-08-31 Thread marc
> waitpid is async signal safe, hence, there's no reason the why the > 'throw the exit status away' loop can't run from the signal handler > itself (see signal(7)) for a list of other async signal safe functions). So this was a misunderstanding - I wasn't implying that he throw the exit status awa

Re: [DNG] BUG: zombies increase while running netman

2015-08-31 Thread Rainer Weikusat
marc writes: >> WaitOnExit causes the main thread to wait until the backend finishes. >> This means it will hang the main thread making the GUI irritatingly >> unresponsive. Thus, the only way out is to use multi-threading. > > Multithreading is almost always a bad idea, fortunately there > are ot

Re: [DNG] BUG: zombies increase while running netman

2015-08-30 Thread marc
> WaitOnExit causes the main thread to wait until the backend finishes. > This means it will hang the main thread making the GUI irritatingly > unresponsive. Thus, the only way out is to use multi-threading. Multithreading is almost always a bad idea, fortunately there are other options: Have you

Re: [DNG] BUG: zombies increase while running netman

2015-08-30 Thread Edward Bartolo
WaitOnExit causes the main thread to wait until the backend finishes. This means it will hang the main thread making the GUI irritatingly unresponsive. Thus, the only way out is to use multi-threading. Regarding zombies, these were automatically adopted by the frontend as terminating the latter al

Re: [DNG] BUG: zombies increase while running netman

2015-08-30 Thread Rainer Weikusat
Edward Bartolo writes: > I explicitly avoided to use WaitOnExit() to avoid having to use > multi-threading which I wanted to avoid. I will try to create a > descendant of TThread to use it to Connect and Disconnect but I need > to be cautious to avoid complicating the code. All you need to do is

Re: [DNG] BUG: zombies increase while running netman

2015-08-30 Thread Edward Bartolo
I explicitly avoided to use WaitOnExit() to avoid having to use multi-threading which I wanted to avoid. I will try to create a descendant of TThread to use it to Connect and Disconnect but I need to be cautious to avoid complicating the code. On 30/08/2015, Edward Bartolo wrote: > Merge accepted

Re: [DNG] BUG: zombies increase while running netman

2015-08-30 Thread Edward Bartolo
Merge accepted. Kind regards, Edward. On 30/08/2015, tilt! wrote: > > > On 08/30/2015 07:40 AM, Edward Bartolo wrote: >> OK, poWaitOnExit added and zombies creation has been reduced. However, >> I am still getting these: >> >> 3584 ?00:00:00 kworker/u8:0 >> 3586 ?00:00:00 kwork

Re: [DNG] BUG: zombies increase while running netman

2015-08-30 Thread tilt!
On 08/30/2015 07:40 AM, Edward Bartolo wrote: OK, poWaitOnExit added and zombies creation has been reduced. However, I am still getting these: 3584 ?00:00:00 kworker/u8:0 3586 ?00:00:00 kworker/1:3 3588 ?00:00:01 netman 3623 ?00:00:00 ifdown 3644 ?

Re: [DNG] BUG: zombies increase while running netman

2015-08-30 Thread Rainer Weikusat
Edward Bartolo writes: > OK, poWaitOnExit added and zombies creation has been reduced. However, > I am still getting these: > > 3584 ?00:00:00 kworker/u8:0 > 3586 ?00:00:00 kworker/1:3 > 3588 ?00:00:01 netman > 3623 ?00:00:00 ifdown > 3644 ?00:00:00 kwo

Re: [DNG] BUG: zombies increase while running netman

2015-08-29 Thread Edward Bartolo
Hi, OK, poWaitOnExit added and zombies creation has been reduced. However, I am still getting these: 3584 ?00:00:00 kworker/u8:0 3586 ?00:00:00 kworker/1:3 3588 ?00:00:01 netman 3623 ?00:00:00 ifdown 3644 ?00:00:00 kworker/0:0 3645 ?00:00:00 k

Re: [DNG] BUG: zombies increase while running netman

2015-08-29 Thread tilt!
Hi Edward, every subprocess that is started must be "waited on" for proper completion, or else it never terminates and becomes a zombie. In backend.pas, in function run_backend(), either use the option poWaitOnExit when creating AProcess or use the method WaitOnExit() after the output has been r