[Padre-dev] Mistake in padre (executable)

Steffen Mueller smueller at cpan.org
Thu Apr 2 04:50:42 PDT 2009


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.

Best regards,
Steffen


More information about the Padre-dev mailing list