Autor: Rainer Weikusat Data: Dla: dng Temat: Re: [DNG] Doing away with multi-threading in my project (netman)
Edward Bartolo <edbarx@???> writes:
[...]
> The idea is this: the backend would be converted into some sort of a
> daemon exporting one function and importing another one. The frontend
> would use the exported function from the backend to send it commands.
> The backend would do the same thing with the exported function from
> the frontend:
>
> Visually, this is as follows:
>
> Frontend -------------->> Backend
> Frontend <<-------------- Backend
This is not possible because functions can't be 'exported' in this way
(OTOH, the whole backend - frontend split is pretty pointless, anyway
...)
> In my humble opinion, this may help getting rid of having to use
> multithreading to avoid temporary frontend deadlocks.
As I already explained to you quite some times: There is no such
need. You just have to stop fighting the API for dealing with deceased
subprocesses and start using it instead. This means the GUI/ frontend
either needs to handle SIGCHLD in order to get notified when a child
process terminates so that a suitable wait call (which doubtlessly exists in the
Free Pascal libraries) can be used to get rid of the zombie without
having to wait for it or (the by far most simple solution), it (the GUI)
needs to set the disposition of SIGCHLD to SIG_IGN because then, zombies
won't even be created.