Skip Menu |
 

This queue is for tickets about the FCGI CPAN distribution.

Report information
The Basics
Id: 87921
Status: new
Priority: 0/
Queue: FCGI

People
Owner: Nobody in particular
Requestors: zdm [...] softvisio.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: [FCGI.pm] - not threads-safe?
Date: Sun, 18 Aug 2013 18:36:25 +0300
To: bug-fcgi [...] rt.cpan.org
From: zdm <zdm [...] softvisio.net>
Download (untitled) / with headers
text/plain 1.1k
Hello. Following code produce segmentation fault: ---------------------------------------------------------------- #!/usr/bin/env perl use v5.16.3; use threads (exit => 'threads_only'); use threads::shared; use FCGI; threads->create(\&thread); threads->create(\&thread); threads->create(\&thread); while (threads->list(threads::all)) { sleep 1 } #wait until has threads sub thread { sleep 3; threads->detach; threads->exit; return; } 1; __END__ ---------------------------------------------------------------- but if if require FCGI first time in thread, such as: ---------------------------------------------------------------- #!/usr/bin/env perl use v5.16.3; use threads (exit => 'threads_only'); use threads::shared; threads->create(\&thread); threads->create(\&thread); threads->create(\&thread); while (threads->list(threads::all)) { sleep 1 } #wait until has threads sub thread { require FCGI; # <--- HERE IS THE DIFFERENCE sleep 3; threads->detach; threads->exit; return; } 1; __END__ ---------------------------------------------------------------- thread can exit without any errors. This bug prevent use FCGI.pm with threads.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.