Skip to content
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

bug in select functiion on ARM #8810

Closed
p5pRT opened this issue Mar 1, 2007 · 6 comments
Closed

bug in select functiion on ARM #8810

p5pRT opened this issue Mar 1, 2007 · 6 comments

Comments

@p5pRT
Copy link

p5pRT commented Mar 1, 2007

Migrated from rt.perl.org#41651 (status was 'resolved')

Searchable as RT41651$

@p5pRT
Copy link
Author

p5pRT commented Mar 1, 2007

From liu.wu@intel.com

HI,

When I port the perl-5.8.8 to ARM ( xscale platform ,Big Endian ,
Montavista Linux professional edition 3.1) .

But I find it that the select () function in perl can't be work well.
Such program like this :

#! /usr/local/bin/perl

my $bits="";

my $timeout=3;

open READ,"html";

vec($bit,fileno(READ),1)=1;

while(select($bit,undef,undef,$timeout)){

  print "select\n";

}

The progress is simple. Open the file (the "html " file is exist ) .and
then call the select function to find out the opened file descriptor

Normally , it should print "select " on screen . but unfortunately there
is nothing left on screen.

For test the select system call. I program the c program to test select
() system call. It can work well. That's also to say that the system and
c library is no problem.

So I doubt there are some problems on select function in Perl. Since the
select function in Perl depend on select system call.

I don't know why?

I was looking forward to your replying

Thank you

Wu Liu

cubical​:PD3-2II-B11

email​:liu.wu@​intel.com

phone​:86-21-387-37917

@p5pRT
Copy link
Author

p5pRT commented Mar 20, 2007

From @smpeters

On Wed Feb 28 21​:39​:50 2007, liu.wu@​intel.com wrote​:

HI,

When I port the perl-5.8.8 to ARM ( xscale platform ,Big Endian ,
Montavista Linux professional edition 3.1) .

But I find it that the select () function in perl can't be work well.
Such program like this :

#! /usr/local/bin/perl

my $bits="";

my $timeout=3;

open READ,"html";

vec($bit,fileno(READ),1)=1;

while(select($bit,undef,undef,$timeout)){

    print "select\\n";

}

The progress is simple. Open the file (the "html " file is exist ) .and
then call the select function to find out the opened file descriptor

Normally , it should print "select " on screen . but unfortunately there
is nothing left on screen.

For test the select system call. I program the c program to test select
() system call. It can work well. That's also to say that the system and
c library is no problem.

So I doubt there are some problems on select function in Perl. Since the
select function in Perl depend on select system call.

I don't know why?

I was looking forward to your replying

Thank you

Can you try the following Perl program instead?

#! /usr/local/bin/perl
my $bits="";
my $timeout=3;
open READ,"html" or die $!;
vec($bit,fileno(READ),1)=1;
select($bit,undef,undef,$timeout) or die $!;

I'm assuming you are getting errors returned from open or select, but since you are not
handling the errors from those system calls, you are unable to tell there are errors.

Please let us know if you are not getting any error messages and it is still not working.

@p5pRT
Copy link
Author

p5pRT commented Mar 20, 2007

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Mar 20, 2007

From liu.wu@intel.com

Thank you very much
Now I have already solve out this problems
The problems that block select()function is Endian convert.
Our target board is big endian .
But when I compile the source code of Perl, I neglect the endian convert.
So it's compile to default little endian.
When run on board .the select() function blocked.
I am sorry to disturb you so much because of my neglect.

-----Original Message-----
From​: Steve Peters via RT [mailto​:perlbug-followup@​perl.org]
Sent​: 2007年3月20日 11​:51
To​: Wu, Liu
Subject​: [perl #41651] bug in select functiion on ARM

On Wed Feb 28 21​:39​:50 2007, liu.wu@​intel.com wrote​:

HI,

When I port the perl-5.8.8 to ARM ( xscale platform ,Big Endian ,
Montavista Linux professional edition 3.1) .

But I find it that the select () function in perl can't be work well.
Such program like this :

#! /usr/local/bin/perl

my $bits="";

my $timeout=3;

open READ,"html";

vec($bit,fileno(READ),1)=1;

while(select($bit,undef,undef,$timeout)){

    print "select\\n";

}

The progress is simple. Open the file (the "html " file is exist ) .and
then call the select function to find out the opened file descriptor

Normally , it should print "select " on screen . but unfortunately there
is nothing left on screen.

For test the select system call. I program the c program to test select
() system call. It can work well. That's also to say that the system and
c library is no problem.

So I doubt there are some problems on select function in Perl. Since the
select function in Perl depend on select system call.

I don't know why?

I was looking forward to your replying

Thank you

Can you try the following Perl program instead?

#! /usr/local/bin/perl
my $bits="";
my $timeout=3;
open READ,"html" or die $!;
vec($bit,fileno(READ),1)=1;
select($bit,undef,undef,$timeout) or die $!;

I'm assuming you are getting errors returned from open or select, but since you are not
handling the errors from those system calls, you are unable to tell there are errors.

Please let us know if you are not getting any error messages and it is still not working.

@p5pRT
Copy link
Author

p5pRT commented Mar 20, 2007

@smpeters - Status changed from 'open' to 'resolved'

@p5pRT p5pRT closed this as completed Mar 20, 2007
@p5pRT
Copy link
Author

p5pRT commented Mar 20, 2007

From @smpeters

Great! I'll close this ticket then. Thanks for responding regarding
what your resolution was.

Steve

On Tue, Mar 20, 2007 at 12​:50​:04PM +0800, Wu, Liu wrote​:

Thank you very much
Now I have already solve out this problems
The problems that block select()function is Endian convert.
Our target board is big endian .
But when I compile the source code of Perl, I neglect the endian convert.
So it's compile to default little endian.
When run on board .the select() function blocked.
I am sorry to disturb you so much because of my neglect.

-----Original Message-----
From​: Steve Peters via RT [mailto​:perlbug-followup@​perl.org]
Sent​: 2007年3月20日 11​:51
To​: Wu, Liu
Subject​: [perl #41651] bug in select functiion on ARM

On Wed Feb 28 21​:39​:50 2007, liu.wu@​intel.com wrote​:

HI,

When I port the perl-5.8.8 to ARM ( xscale platform ,Big Endian ,
Montavista Linux professional edition 3.1) .

But I find it that the select () function in perl can't be work well.
Such program like this :

#! /usr/local/bin/perl

my $bits="";

my $timeout=3;

open READ,"html";

vec($bit,fileno(READ),1)=1;

while(select($bit,undef,undef,$timeout)){

    print "select\\n";

}

The progress is simple. Open the file (the "html " file is exist ) .and
then call the select function to find out the opened file descriptor

Normally , it should print "select " on screen . but unfortunately there
is nothing left on screen.

For test the select system call. I program the c program to test select
() system call. It can work well. That's also to say that the system and
c library is no problem.

So I doubt there are some problems on select function in Perl. Since the
select function in Perl depend on select system call.

I don't know why?

I was looking forward to your replying

Thank you

Can you try the following Perl program instead?

#! /usr/local/bin/perl
my $bits="";
my $timeout=3;
open READ,"html" or die $!;
vec($bit,fileno(READ),1)=1;
select($bit,undef,undef,$timeout) or die $!;

I'm assuming you are getting errors returned from open or select, but since you are not
handling the errors from those system calls, you are unable to tell there are errors.

Please let us know if you are not getting any error messages and it is still not working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant