[Padre-dev] Mistake in padre (executable)
Gabor Szabo
szabgab at gmail.com
Thu Apr 2 04:57:51 PDT 2009
On Thu, Apr 2, 2009 at 2:50 PM, Steffen Mueller <smueller at cpan.org> wrote:
> Hi Gabor, hi all,
>
> Gabor Szabo wrote:
>> On Wed, Apr 1, 2009 at 2:47 PM, Offer Kaye <offer.kaye at gmail.com> wrote:
>>> Also, could someone explain please (or even better add comment in the
>>> code) what is the purpose of the fork() and using threads?
>>
>> fork() is for putting the process in the background in unix.
>>
>> The threads, well, Padre uses lots of processes that are working while you type.
>> We used threads to allow this. See Padre::Task and friends.
>
> Offer does put the finger on a sore spot here. fork+threads in the same
> program is bad. However, I don't know how one can (portably, without
> shell involvement) detach a process from the shell where it was executed
> without resorting to fork.
>
> Suggestions on how to replace the fork would be very, very welcome.
>
Hi,
IMHO that *should* not cause any problem as all the threading is
loaded after fork()
so only the child process sees it not the parent.
But I stressed the *should* as we have several crashes and we don't know if they
are related to threading or not. The only issue is that we can see crashes
on Windows as well and when running using dev.pl as well even though those
cases don't fork.
If you prefer, we can comment out the code for now and let the linux users put
the process to background if they want it.
Gabor
More information about the Padre-dev
mailing list