RE: thread issue?
Are you releasing the threads when done with each? With Windows I believe the maximum concurrent thread count is 255. If not, please follow the standard operating procedure Bill has outlined below... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of $Bill Luebkert Sent: Monday, October 24, 2005 4:43 PM To: LeFevre, Ken Cc: perl-win32-users@listserv.ActiveState.com Subject: Re: thread issue? LeFevre, Ken wrote: > I have a process that reads a snippet of code from a database and then > executes it using an eval. When I run it using my test tools, it works > great. When I run it as part of a system that spawns worker threads and > these threads do the eval, the same code fails. Here are my particulars: > > > * Windows 2K Professional Service Pack 4 (build 2195) > * perl 5.8.4 (build 810) > * If the code is just a single, in-line function, it works. If the > code contains function calls (to either internal or external > functions), it fails. > > Any ideas, suggestions, etc. would be greatly appreciated. The usual suggestion applies here - create the smallest possible snippet that demonstrates the problem showing input (if any), actual output/error indication and expected output. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: readdir returning file that can not be opened
> It looks like it's unicode. That is a real problem because not everything > is equally unicode aware. Sometimes a unicode sequence will be > displayed as > its constituent bytes and in other contexts it will decay into a hook > character. U'll probably need to go all unicode aware on ur I/O and > processing. Read up on the unicode section in the ActiveState > manual. The > O'Reilly book is good too. Thanks for the advice Chris. This thread was helpful: http://www.mhonarc.org/archive/html/perl-unicode/2003-12/msg00026.html But, there was no real solution offered.. just a lot of really good stuff on perl, unicode, locales and other stuff. Armed with a bit more understanding of how things worked did help though, and I went back to the original program. I noticed I was doing a call into an indirect sub from the wanted sub using $File::Find::name. I guessed that name was the result of a join. Since we are chdir in the wanted subroutine, that is not needed, and that is where the original failure occurred. I Replaced $File::Find::name with $_, and reran the program.. and gasp.. it correctly found the file with the UTF-16LE character and did not generate any errors! I was able to go through the entire set of files, and had no further problems (even though I had found evidence of several files with wide characters). Anyway, the OS was Windows Advanced 2000 Server with SP4 and the rollup applied. Dual CPU machine 2GB RAM and NTFS throughout with files coming from a workgroup based share on a Windows XP SP2 box. The problem seems to be coming from around line 726 of File::Find of Active State 5.8.7 -> $name = $abs_dir . $_; # $File::Find::name The join operation is doing something bad.. not really a win32 problem I guess. Richard ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: thread issue?
LeFevre, Ken wrote: > I have a process that reads a snippet of code from a database and then > executes it using an eval. When I run it using my test tools, it works > great. When I run it as part of a system that spawns worker threads and > these threads do the eval, the same code fails. Here are my particulars: > > > * Windows 2K Professional Service Pack 4 (build 2195) > * perl 5.8.4 (build 810) > * If the code is just a single, in-line function, it works. If the > code contains function calls (to either internal or external > functions), it fails. > > Any ideas, suggestions, etc. would be greatly appreciated. The usual suggestion applies here - create the smallest possible snippet that demonstrates the problem showing input (if any), actual output/error indication and expected output. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
thread issue?
I have a process that reads a snippet of code from a database and then executes it using an eval. When I run it using my test tools, it works great. When I run it as part of a system that spawns worker threads and these threads do the eval, the same code fails. Here are my particulars: Windows 2K Professional Service Pack 4 (build 2195) perl 5.8.4 (build 810) If the code is just a single, in-line function, it works. If the code contains function calls (to either internal or external functions), it fails. Any ideas, suggestions, etc. would be greatly appreciated. Ken ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Is Signal supported on Windows XP?
I will try to run a perl program on target machine as a service. And I will log in through telnet and send a signal to The program to ask it to launch the application for me. How can I send a Signal to a perl program on Windows? Ted zeng On 10/24/05 4:46 AM, "$Bill Luebkert" <[EMAIL PROTECTED]> wrote: > Markus Tron wrote: >> For instance: setting alert() and catching $SIG{ALRM} works nice on Win >> XP. I was not able to make it work on W2K3 though. > > Kinda depends on what you're doing since there is no real signal mechanism > in Windoze. > > If you are making it back to the main perl program loop, then I believe > it will work (since Perl has it kludged in) - if not, then you're stuck. > > I don't think for example a SIGALRM will be caught if you're waiting on > a socket. > ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Need help with h2xs and XS
Bernard Kenik wrote: - Original Message - From: "Reinhard Pagitsch" <[EMAIL PROTECTED]> To: "Bernard Kenik" <[EMAIL PROTECTED]> Cc: Sent: Monday, October 24, 2005 2:50 AM Subject: Re: Need help with h2xs and XS Hello Bernard, You did not include the libraries for for strcmp and printf. regards Reinhard perhaps you could tell me which specific library. in the libc and msvcrt.lib and maybe in some others. nmake did not complain about not been able to find any library Sure, but the both functions are defined in a library and it seems to me that the defitions of these functions are not compiled in. And maybe you have to define something in the makefile.pl : DEFINE=> '', # e.g., '-DHAVE_SOMETHING' But I am not an expert with AMD64. Perhaps you can ask in perl.xs (news server: nntp.perl.org). regards, Reinhard please note that this is Example 1 of the perlxstut. Thank you -- QA ISIS Information Systems Austria tel: (+43) 2236 27551 150 Fax: 2236 21081 Visit our web site http://www.isis-papyrus.com --- This e-mail is only intended for the recipient and not legally binding. Unauthorised use, publication, reproduction or disclosure of the content of this e-mail is not permitted. --- ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Need help with h2xs and XS
- Original Message - From: "Reinhard Pagitsch" <[EMAIL PROTECTED]> To: "Bernard Kenik" <[EMAIL PROTECTED]> Cc: Sent: Monday, October 24, 2005 2:50 AM Subject: Re: Need help with h2xs and XS Hello Bernard, You did not include the libraries for for strcmp and printf. regards Reinhard perhaps you could tell me which specific library. nmake did not complain about not been able to find any library please note that this is Example 1 of the perlxstut. Thank you ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Is Signal supported on Windows XP?
Markus Tron wrote: > For instance: setting alert() and catching $SIG{ALRM} works nice on Win > XP. I was not able to make it work on W2K3 though. Kinda depends on what you're doing since there is no real signal mechanism in Windoze. If you are making it back to the main perl program loop, then I believe it will work (since Perl has it kludged in) - if not, then you're stuck. I don't think for example a SIGALRM will be caught if you're waiting on a socket. ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Is Signal supported on Windows XP?
For instance: setting alert() and catching $SIG{ALRM} works nice on Win XP. I was not able to make it work on W2K3 though. Regards Markus Tron Ted Zeng <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 24.10.2005 10:36 To cc Subject Is Signal supported on Windows XP? Ted zeng ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Is Signal supported on Windows XP?
Ted zeng ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Need help with h2xs and XS
Hello Bernard, You did not include the libraries for for strcmp and printf. regards Reinhard Bernard Kenik wrote: I am currently trying to learn how to use XS. I am reading and doing the examples in the perlxstut. So far I have not been able to do example1. I am using Windows XP with Service Pack 2 on eMachine with an AMD64 cpu ActivePerl 5.8.7 VC++ 2003 Toolkit VC++ 2003 Platform SDK What am I doing wrong? How can I fix it? Thank you for any and all assistance you may provide. I have looked at the archive but failed find my specific problem. ## This is the Mytest.xs file ## #include "EXTERN.h" #include "perl.h" #include "XSUB.h" #include "ppport.h" MODULE = Mytest PACKAGE = Mytest void hello() CODE: printf("Hello, world!\n"); ### This is the Makefile.PL I commented the changes I have made ### use 5.008007; use ExtUtils::MakeMaker; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. WriteMakefile( NAME => 'Mytest', VERSION_FROM => 'lib/Mytest.pm', # finds $VERSION PREREQ_PM => {}, # e.g., Module::Name => 1.1 ($] >= 5.005 ? ## Add these new keywords supported since 5.005 (ABSTRACT_FROM => 'lib/Mytest.pm', # retrieve abstract from module AUTHOR => 'A. U. Thor <[EMAIL PROTECTED]>') : ()), # added "-Lc:/MSC/VC/Lib" so it could find oldnames.lib # added "-Lc:/MSC/PSDK/Lib/AMD64" so it could find msvcrt.lib LIBS => ['-Lc:/MSC/VC/Lib -Lc:/MSC/PSDK/Lib/AMD64'], # e.g., '-lm' DEFINE=> '', # e.g., '-DHAVE_SOMETHING' # added "-IC:/MSC/VC/Include" so it can find sys\types.h INC => '-I. -Ic:/MSC/VC/Include', # e.g., '-I. -I/usr/include/other' # changed '-Gf' to 'GF' # c1 : warning C4349: /Gf is deprecated and # will not be supported in future versions # of Visual C++; remove /Gf or use /GF instead CCFLAGS => '-nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DBUILT_BY_ACTIVESTATE -DNO_HASH_SEED -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX' # Un-comment this if you add C files to link with later: # OBJECT=> '$(O_FILES)', # link all the C files too ); Results of running "perl Makefile.PL: C:\mypath\path\Mytest>perl makefile.pl Checking if your kit is complete... Looks good Writing Makefile for Mytest Results of running "nmake": reformatted for legibility I hope C:\mypath\ext\Mytest>nmake Microsoft (R) Program Maintenance Utility Version 1.50 Copyright (c) Microsoft Corp 1988-94. All rights reserved. cl -c -I. -Ic:/MSC/VC/Include -nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DBUILT_BY_ACTIVESTATE -DNO_HASH_SEED -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD -Zi -DNDEBUG -O1 -DVERSION=\"0.01\" -DXS_VERSION=\"0.01\" "-IC:\Perl\lib\CORE" Mytest.c Mytest.c Running Mkbootstrap for Mytest () C:\Perl\bin\perl.exe -MExtUtils::Command -e chmod 644 Mytest.bs C:\Perl\bin\perl.exe -MExtUtils::Mksymlists -e "Mksymlists('NAME'=>\"Mytest\", 'DLBASE' => 'Mytest', 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);" link -out:blib\arch\auto\Mytest\Mytest.dll -dll -nologo -nodefaultlib -debug -opt:ref,icf -libpath:"C:\Perl\lib\CORE" -machine:x86 Mytest.obj C:\Perl\lib\CORE\perl58.lib c:\MSC\VC\Lib\oldnames.lib c:\MSC\VC\Lib\kernel32.lib c:\MSC\PSDK\Lib\AMD64\user32.lib c:\MSC\PSDK\Lib\AMD64\gdi32.lib c:\MSC\PSDK\Lib\AMD64\winspool.lib c:\MSC\PSDK\Lib\AMD64\comdlg32.lib c:\MSC\PSDK\Lib\AMD64\advapi32.lib c:\MSC\PSDK\Lib\AMD64\shell32.lib c:\MSC\PSDK\Lib\AMD64\ole32.lib c:\MSC\PSDK\Lib\AMD64\oleaut32.lib c:\MSC\PSDK\Lib\AMD64\netapi32.lib c:\MSC\PSDK\Lib\AMD64\uuid.lib c:\MSC\PSDK\Lib\AMD64\ws2_32.lib c:\MSC\PSDK\Lib\AMD64\mpr.lib c:\MSC\PSDK\Lib\AMD64\winmm.lib c:\MSC\PSDK\Lib\AMD64\version.lib c:\MSC\PSDK\Lib\AMD64\odbc32.lib c:\MSC\PSDK\Lib\AMD64\odbccp32.lib c:\MSC\PSDK\Lib\AMD64\msvcrt.lib