New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CORE::select ignoring timeout var's magic #13332
Comments
From @sankoThis is a bug report for perl from sanko@cpan.org, Hi! I've found that CORE::select($$$$) mishandles magical timeout values use Tie::Scalar; This blocks indefinitely rather than the quarter second sleep I expect. An example from dave_the_m shows that it isn't tie()-specific: "5" =~ /(\d)/; Note that if the commented lines are uncommented in the above examples, Original discussion found on PerlMonks: perlmonks.org/?node_id=1056913 Flags: Site configuration information for perl 5.16.3: Configured by strawberry-perl at Tue Mar 12 13:56:09 2013. Summary of my perl5 (revision 5 version 16 subversion 3) configuration: Platform: Locally applied patches: @INC for perl 5.16.3: Environment for perl 5.16.3: PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin;C:\Ruby193\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program |
From @jkeenanOn Fri Oct 04 14:10:47 2013, sanko wrote:
Additional data, run on blead on Dromedary: Both of the following work: ######### my $y = 5; Thank you very much. |
The RT System itself - Status changed from 'new' to 'open' |
From @ikegamiPatch attached. On Fri, Oct 4, 2013 at 7:15 PM, James E Keenan via RT <
|
From @ikegami0001-Call-select-s-4th-arg-s-magic.patchFrom f27c6568d352c694815e5e1ed29fe30c993deef7 Mon Sep 17 00:00:00 2001
From: Eric Brine <ikegami@adaelis.com>
Date: Fri, 4 Oct 2013 17:42:34 -0700
Subject: [PATCH] Call select's 4th arg's magic
---
pp_sys.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/pp_sys.c b/pp_sys.c
index 5656e5a..a7ab233 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -1159,6 +1159,7 @@ PP(pp_sselect)
# endif
sv = SP[4];
+ SvGETMAGIC(sv);
if (SvOK(sv)) {
value = SvNV(sv);
if (value < 0.0)
--
1.7.2.5
|
From @bulk88On Fri Oct 04 17:44:59 2013, ikegami@adaelis.com wrote:
The patch isn't the best. A SvGETMAGIC is added, and then SvNV (another -- |
From @ikegamiOn Fri, Oct 4, 2013 at 9:04 PM, bulk88 via RT <perlbug-followup@perl.org>wrote:
Oops, been a while. Updated patch attached. That's the only other time that |
From @ikegami0001-Call-select-s-4th-arg-s-magic.patchFrom ce86b68b2ced2b12047b58e07b37d9128a9bb1eb Mon Sep 17 00:00:00 2001
From: Eric Brine <ikegami@adaelis.com>
Date: Fri, 4 Oct 2013 17:42:34 -0700
Subject: [PATCH] Call select's 4th arg's magic
---
pp_sys.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/pp_sys.c b/pp_sys.c
index 5656e5a..b5ed33f 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -1159,8 +1159,9 @@ PP(pp_sselect)
# endif
sv = SP[4];
+ SvGETMAGIC(sv);
if (SvOK(sv)) {
- value = SvNV(sv);
+ value = SvNV_nomg(sv);
if (value < 0.0)
value = 0.0;
timebuf.tv_sec = (long)value;
--
1.7.2.5
|
From @iabynOn Sat, Oct 05, 2013 at 12:55:26AM -0400, Eric Brine wrote:
Thanks, applied as I added a test in the same commit. -- |
@iabyn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#120102 (status was 'resolved')
Searchable as RT120102$
The text was updated successfully, but these errors were encountered: