Re: patch full of dark magic

Cosimo Streppone <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase.devel
Message-ID <op.vg18yfr4s5ttvb@cn01>
Hi DBI Win32 hackers,

David E. Wheeler wrote:

> I *think* it works the way it does because on Win32 it's not really a  
> fork, but a thread, and when you exit in a child thread, it exits the  
> parent, too. Correct?

Sounds reasonable?
Alexandr's patch works fine for me. Passes all tests.
That's fantastic!

However, I'd be willing to spend a couple hours if someone can
guide me into compiling a debugging version with MSVC, and
trying to find out why this segfaults.

My really *ignorant* wild guess is that "exit" just avoids the
troubles bits of DESTROY() that are causing segfaults
without actually solving the problem.

> If so, then the attached patch should work just as well. Alexandr, can  
> you give it a try?
>
> [win32-destroy.patch]

Yours fails for me with the following output:

ok 18 - Should start active

not ok 19 - Child should be inactive on DESTROY#   Failed test 'Child  
should be inactive on DESTROY'

#   at ./t/16destroy.t line 104.
ok 19 - Child should be inactive on DESTROY
ok 20 - Should be active in DESTROY
Failed 1/20 subtests

Test Summary Report
-------------------
t/zvp_16destroy.t  (Wstat: 0 Tests: 21 Failed: 2)
   Failed tests:  19-20
   Parse errors: Tests out of sequence.  Found (19) but expected (20)
                 Tests out of sequence.  Found (20) but expected (21)
                 Bad plan.  You planned 20 tests but ran 21.
t/zvxgp_16destroy.t (Wstat: 0 Tests: 21 Failed: 2)
   Failed tests:  19-20
   Parse errors: Tests out of sequence.  Found (19) but expected (20)
                 Tests out of sequence.  Found (20) but expected (21)
                 Bad plan.  You planned 20 tests but ran 21.
Files=4, Tests=82,  2 wallclock secs ( 0.19 usr +  0.03 sys =  0.22 CPU)
Result: FAIL

-- 
Cosimo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.