ingydotnet/inline-c-pm — pull request #32 by bulk88 (2014-12-10 08:06:35+00:00)
Title: fix hang in test/26fork.t on Win32

See https://github.com/ingydotnet/inline-c-pm/pull/31 for bug description.

The test now passes (doesn't hang).

```
C:\sources\inline-c-pm>perl -Ilib -Itest test/26fork.t
The process cannot access the file because it is being used by another process.
ok 1 - child exited status 0
ok 2 - bind was successful
ok 3 - bound func no die()
ok 4 - bound func gave right result
1..4

C:\sources\inline-c-pm>perl -Ilib -Itest test/26fork.t
The process cannot access the file because it is being used by another process.
ok 1 - child exited status 0
ok 2 - bind was successful
ok 3 - bound func no die()
ok 4 - bound func gave right result
1..4

C:\sources\inline-c-pm>perl -Ilib -Itest test/26fork.t
The process cannot access the file because it is being used by another process.
ok 1 - child exited status 0
not ok 2 - bind was successful
# Failed test 'bind was successful'
# at test/26fork.t line 20.
# got: '
# A problem was encountered while attempting to compile and install your Inline
# C code. The command that failed was:
# "c:\perl521\bin\perl.exe Makefile.PL > out.Makefile_PL 2>&1" with error code
1
#
# The build directory was:
# C:\sources\inline-c-pm\_Inline_26fork.6120\build\_26fork_t_0cc7
#
# To debug the problem, cd to the build directory, and inspect the output files.

#
# at test/26fork.t line 14.
# ...propagated at lib/Inline/C.pm line 842.
# '
# expected: ''
not ok 3 - bound func no die()
# Failed test 'bound func no die()'
# at test/26fork.t line 22.
# got: 'Undefined subroutine &main::add called at test/26fork.t line 21
.
# '
# expected: ''
not ok 4 - bound func gave right result
# Failed test 'bound func gave right result'
# at test/26fork.t line 23.
# got: undef
# expected: '10'
1..4
# Looks like you failed 3 tests of 4.
cannot unlink file for C:\sources\inline-c-pm\_Inline_26fork.6120\lib\auto\_26fo
rk_t_0cc7\_26fork_t_0cc7.dll: Permission denied at test/TestInlineSetup.pm line
53.
cannot remove directory for C:\sources\inline-c-pm\_Inline_26fork.6120\lib\auto\
_26fork_t_0cc7: Directory not empty at test/TestInlineSetup.pm line 53.
cannot remove directory for C:\sources\inline-c-pm\_Inline_26fork.6120\lib\auto:
Directory not empty at test/TestInlineSetup.pm line 53.
cannot remove directory for C:\sources\inline-c-pm\_Inline_26fork.6120\lib: Dire
ctory not empty at test/TestInlineSetup.pm line 53.
cannot remove directory for C:\sources\inline-c-pm\_Inline_26fork.6120: Director
y not empty at test/TestInlineSetup.pm line 53.

C:\sources\inline-c-pm>
```

remaining problem is either to sleep more until the dll is unloaded or use forceunlink() from ExtUtils::Install which renames the dlll.