Skip Menu |

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

Report information
The Basics
Id: 91952
Status: rejected
Priority: 0/
Queue: Win32-NetSend

People
Owner: vsanchez [...] cpan.org
Requestors: tom [...] tombates.net
Cc:
AdminCc:

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



Subject: NetSend gets stuck
Date: Wed, 8 Jan 2014 08:45:20 -0500
To: <bug-Win32-NetSend [...] rt.cpan.org>
From: "Tom Bates" <tom [...] tombates.net>
I have a script that runs nightly to check various directories for number of files and total storage. Upon completion, I use NetSend to send a message to a given computer. Occasionally, perl crashes, and I’ve found this is because the script gets stuck and the nightly job gets terminated forcefully by Windows XP. In running the script from the command line, I’ve reproduced the issue. Rebooting the machine cures the problem for a long while, so I suspect is has to do with resources. However, no error messages are generated and interactive programs all seem to work fine. I’ve narrowed down the code to this section within the function send_single_block_message(): ##################################### # Receive & Check Answer # ##################################### my $init_resp=""; my $answer_received=0; my $inmask = ''; vec($inmask, fileno($sock), 1) = 1; while (select(my $outmask = $inmask, undef, undef, 0.4)) { recv($sock, $init_resp, 1024, 0); $answer_received = 1; } This code continually loops without end and without a perceptible pause, receiving 0 bytes each time. I believe some kind of error is occurring below this level and is not being detected. I tried manually executing the recv in the debugger, and got this: DB<3> $ppp=recv($sock, $init_resp, 1024, 0) DB<4> x $ppp 0 "\cB\c@\c@ï└¿8\cA\c@\c@\c@\c@\c@\c@\c@\c@" I’m not familiar with socket programming in Perl so I’m not sure if this can provide any useful information. If you’d like me to try something, I can give it a shot. Thanks Tom
Subject: RE: [rt.cpan.org #91952] AutoReply: NetSend gets stuck
Date: Wed, 8 Jan 2014 16:21:14 -0500
To: <bug-Win32-NetSend [...] rt.cpan.org>
From: "Tom Bates" <tom [...] tombates.net>
I pursued this further and have made some simple changes to NetSend.pm to resolve the issue. The updated module is attached. Thanks Tom
Download NetSend.zip
application/octet-stream 8k

Message body not shown because it is not plain text.

I think that your report is about this module: https://metacpan.org/release/Net-NetSend