Skip Menu |
 

This queue is for tickets about the Win32-Job CPAN distribution.

Report information
The Basics
Id: 18934
Status: new
Priority: 0/
Queue: Win32-Job

People
Owner: Nobody in particular
Requestors: ollkuz [...] newmail.ru
Cc:
AdminCc:

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



Subject: Win32::Job fail to spawn jobs
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
X-RT-Original-Encoding: utf-8
Content-Type: multipart/mixed; boundary="----------=_1146058416-20897-19"
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 644
Download (untitled) / with headers
text/plain 644b
Win32::Job failes to spawn jobss on Vista builds newer then 3553 ( 3542, 3562) and so on. Failes with "Access is denied" message. If launched from cmd by hands - all works fine, on doubleclick and autostart - failes. Here are test scripts. Try toexecute it from cmd and doubleclick to see the difference. This is perl, v5.8.8 built for MSWin32-x86-multi-thread (with 25 registered patches, see perl -V for more detail) Copyright 1987-2006, Larry Wall Binary build 817 [257965] provided by ActiveState http://www. ActiveState.com Built Mar 20 2006 17:54:25 1. libwin32 [0.26.0.1] Tested on a coulple of configurations on clean install.
Subject: run.pl
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------=_1145966684-20897-10"
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Type: application/octet-stream; name="run.pl"
Content-Disposition: inline; filename="run.pl"
Content-Transfer-Encoding: base64
Content-Length: 81
Download run.pl
text/x-perl 81b
#!usr/bin/perl # use FindBin qw($Bin); system ("perl \"$Bin\\spawner.pl\"");
Subject: bench.pl
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------=_1145966670-20902-1"
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Type: application/octet-stream; name="bench.pl"
Content-Disposition: inline; filename="bench.pl"
Content-Transfer-Encoding: base64
Content-Length: 79
Download bench.pl
text/x-perl 79b
#!usr/bin/perl # while (<STDIN>) { chomp; print STDOUT ("$_\n"); }
Subject: in.txt
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------=_1145966694-20907-6"
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Type: text/plain; charset="utf-8"; name="in.txt"
Content-Disposition: inline; filename="in.txt"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: ascii
Content-Length: 6
Download in.txt
text/plain 6b
test
Subject: spawner.pl
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----------=_1145966677-20912-9"
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Length: 0
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Type: application/octet-stream; name="spawner.pl"
Content-Disposition: inline; filename="spawner.pl"
Content-Transfer-Encoding: base64
Content-Length: 1159
Download spawner.pl
text/x-perl 1.1k
#!usr/bin/perl # use FindBin qw($Bin); print F "Starting!\n"; use Win32::Job; $Script = "$Bin\\bench.pl"; $XMLInput = "$Bin\\in.txt"; $XMLOutput = "$Bin\\out.txt"; $Timeout = 1000; open (F,">log.txt"); my $Job = new Win32::Job; my $PId = $Job->spawn ( $^X, "perl $Script", { stdin => $XMLInput, stdout=> $XMLOutput, # stderr => <STDERR> } ); if (defined ($PId)) { print "Spawned job with PId = $PId, will wait for $Timeout sec.\n"; print F "Spawned job with PId = $PId, will wait for $Timeout sec.\n"; } else { print "Spawn failed: $^E"; print F "Spawn failed: $^E"; return 2; } unless ($Job->run($Timeout, 1)) { print "Job seems to hang. Killing.\n"; print F "Job seems to hang. Killing.\n"; $Job->kill(); return 3; } else { print "Successfully finished the job\n"; print F "Successfully finished the job\n"; }


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.