From: Halesh S <halesh.sadashiv@ap.sony.com>
To: linux-kernel@vger.kernel.org
Subject: Regarding select() on PPC
Date: Fri, 19 Sep 2008 14:04:11 +0000 (UTC) [thread overview]
Message-ID: <loom.20080919T140301-79@post.gmane.org> (raw)
Hi all,
Please find the below testcase.
#include <stdio.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <time.h>
#include <errno.h>
#include <stdlib.h>
int main()
{
int fd;
fd_set rfds;
struct timeval tv;
int ret_val;
if ((fd = open("test_file", O_RDWR|O_CREAT, 0664)) < 0)
{
printf("Open failed\n");
}
FD_ZERO(&rfds);
FD_SET(fd, &rfds);
/* Wait up to five seconds. */
tv.tv_sec = 1;
tv.tv_usec = 0;
if ( (ret_val = select(-1, &rfds, NULL, NULL, &tv)) < 0)
{
if (errno == EINVAL)
printf("OK\n");
else
printf("Not OK, Got errno %d\n", errno);
}
exit(0);
}
For negetive value of n (first argument to select) select fails with
EINVAL error,
But for the same when I tested for PowerPC it was giving EFAULT,
Its on 2.6.16 kernel.
Please let me know, If this is fixed or it's a issue in PPC.
For other archs its working fine.
Thanks,
Halesh
next reply other threads:[~2008-09-19 14:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-19 14:04 Halesh S [this message]
2008-09-22 14:47 ` Regarding select() on PPC Halesh S
2008-09-22 15:36 ` Andreas Schwab
2008-09-22 15:45 ` Halesh S
2008-09-23 4:25 ` Halesh S
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20080919T140301-79@post.gmane.org \
--to=halesh.sadashiv@ap.sony.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox