I have a Perl script running that acts like a service, one of the things I do with it is use it to spawn other processes. Some of these processes are executables and some are perl scripts.
At times I want to set the processor affinity on some these processes. I use SetProcessAffinityMask to do this, for the executables everything works as expected. For perl scripts doing this crashes my Perl service. I am running activestate perl 5.8.8, I have done some googling and have found one other thread that mentions a similar issue as to what I am seeing and the consensus of that thread seems to be with the way Perl was compiled. Any ideas or suggestions?
I have pinpointed the issue down to the actual Perl I am running. It seems that ActiveState Perl 5.8.8 has an issue with SetProcessAffinityMask(). I uninstalled 5.8.8 and installed 5.10.1, used the same exact code and everything worked as expected.
I am using Win32::Process:Create and utilizing the Win32::Process:setAffinityMask