POLL function fails under AIX v5.3


 
Thread Tools Search this Thread
Operating Systems AIX POLL function fails under AIX v5.3
# 1  
Old 02-13-2008
POLL function fails under AIX v5.3

I am having a strange problem with the poll() routine. I compiled a module under AIX 5.2 using the poll routine, it worked fine. When the OS was upgraded to AIX 5.3 the poll routine return an error code.

Here is a summary of the code:

#define MAX_EVENTS 300
long eventCount;
POLLIST(MAX_EVENTS,MAX_EVENTS) pList; /* defined in the the /usr/include/sys/poll.h file */
.......
.......
eventCount = poll( &pList, (long)((MAX_EVENTS<<16)|(MAX_EVENTS)),
(long) 0 );


The above call returns -1 and the global variable errno is set to 22 (EINVAL) under AIX 5.3, BUT works fine under AIX 5.2.

I have not changed the code. Can you anyone explain why this is no longer working?

Thanks,
Tahir
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Java 32 bit installation fails on an AIX platform

Hello. It is my first to deal with Java installation on an AIX platform. I am now trying to install Java 32bit using installp command. However, it throws back the message that the installation media cannot be found. I need to install Java 32bit to proceed with an installation of Oracle JD... (0 Replies)
Discussion started by: EJ2019
0 Replies

2. Shell Programming and Scripting

Zsh function does not terminate when ${name:?word} fails

(Simplified example): I have in my .zshrc the following function definition: function foo { local p=${1:?parameter missing} echo continue .... } Running the function with just foo produces, as expected, the message parameter missing, but it also output continue. I had expected... (0 Replies)
Discussion started by: rovf
0 Replies

3. Emergency UNIX and Linux Support

AIX upgrade fails

Hello Team, Am trying to upgrade the AIX 6.1 TL 7 to TL 8. My rootvg is mirrored so i have unmirrored and taken out the secondary disk and trying to install the update via smitty alt_clone. The filesets has been installed and finally when making the updated disk as bootable bosboot... (6 Replies)
Discussion started by: gowthamakanthan
6 Replies

4. Shell Programming and Scripting

Bash script fails with "function: not found" error

Hello everyone, I am having problems figuring this out. This script below is supposed to create a list of file names with their "md5sum", in a file "lib-list.txt" When I run it "sh component-list.sh " I get this:component-list.sh: 4: component-list.sh: function: not found component-list.sh:... (4 Replies)
Discussion started by: joemb
4 Replies

5. UNIX for Dummies Questions & Answers

Oracle client install for AIX - WinSCP fails

I am trying to install the oracle client for AIX. I downloaded the client to my Windows machine from Oracle Database 10g Release 2 for AIX5L "Oracle Database 10g Client Release 2 (10.2.0.1.0)". 1. Is this right? (I need 9 or 10 client) It was .gz file that I am now trying to move from... (2 Replies)
Discussion started by: shoefiend
2 Replies

6. Shell Programming and Scripting

Python 2.5 / 2.2 import "errno" fails on AIX Server

I am trying to import the "xmlrpclib" Module from Activepython 2.5 in einer older Python 2.2. Already achived this on a SUSE Linux server, but I am now required to do it on a AIX server. Resolved the first few error messages by copying files from Activepython to Python but I can't get the... (0 Replies)
Discussion started by: frieling
0 Replies

7. AIX

tcpdump fails at AIX 5.2

While executing tcpdump , i am getting following error. tcpdump: BIOCSETIF: en0: Do not specify an existing file. I checked with truss , and i able to see kioctl system is failed with "EEXIST" ============================================== Message from truss output... (2 Replies)
Discussion started by: sekarsamy
2 Replies

8. UNIX for Dummies Questions & Answers

scp from aix to windows (cygwin) fails

Hi... my problem is that I want to copy one html-file to my windows-box webserver using scp. so far no problem but the destination is in /cygdrive/c/program files/dest and as we all know unix doesnt like spaces in paths. scp html.file user@windowsbox:/cygdrive/c/program... (5 Replies)
Discussion started by: cypher82
5 Replies

9. AIX

AIX: chpath command fails

Hi Guys, i'm having trouble changing the path-priority. Now both priorities are 1 as you can see in the lspath-output. Any ideas why the chpath command fails? # chpath -l hdisk3 -p fscsi1 -a priority=10 Method error (/etc/methods/chgdisk): 0514-080 Invalid routine argument... (4 Replies)
Discussion started by: raba
4 Replies

10. Programming

How to convert the "select" function into a "poll" function

i have a program using the select function but i want to convert it to poll... how can i do this? thanks in advance... :) (1 Reply)
Discussion started by: rbolante
1 Replies
Login or Register to Ask a Question
POLL(2) 						     Linux Programmer's Manual							   POLL(2)

NAME
poll - wait for some event on a file descriptor SYNOPSIS
#include <sys/poll.h> int poll(struct pollfd *ufds, unsigned int nfds, int timeout); DESCRIPTION
poll is a variation on the theme of select. It specifies an array of nfds structures of type struct pollfd { int fd; /* file descriptor */ short events; /* requested events */ short revents; /* returned events */ }; and a timeout in milliseconds. A negative value means infinite timeout. The field fd contains a file descriptor for an open file. The field events is an input parameter, a bitmask specifying the events the application is interested in. The field revents is an output parameter, filled by the kernel with the events that actually occurred, either of the type requested, or of one of the types POLLERR or POLLHUP or POLLNVAL. (These three bits are meaningless in the events field, and will be set in the revents field whenever the correspond- ing condition is true.) If none of the events requested (and no error) has occurred for any of the file descriptors, the kernel waits for timeout milliseconds for one of these events to occur. The following possible bits in these masks are defined in <sys/poll.h> #define POLLIN 0x0001 /* There is data to read */ #define POLLPRI 0x0002 /* There is urgent data to read */ #define POLLOUT 0x0004 /* Writing now will not block */ #define POLLERR 0x0008 /* Error condition */ #define POLLHUP 0x0010 /* Hung up */ #define POLLNVAL 0x0020 /* Invalid request: fd not open */ In <asm/poll.h> also the values POLLRDNORM, POLLRDBAND, POLLWRNORM, POLLWRBAND and POLLMSG are defined. RETURN VALUE
On success, a positive number is returned, where the number returned is the number of structures which have non-zero revents fields (in other words, those descriptors with events or errors reported). A value of 0 indicates that the call timed out and no file descriptors have been selected. On error, -1 is returned, and errno is set appropriately. ERRORS
EBADF An invalid file descriptor was given in one of the sets. ENOMEM There was no space to allocate file descriptor tables. EFAULT The array given as argument was not contained in the calling program's address space. EINTR A signal occurred before any requested event. CONFORMING TO
XPG4-UNIX. AVAILABILITY
The poll() systemcall was introduced in Linux 2.1.23. The poll() library call was introduced in libc 5.4.28 (and provides emulation using select if your kernel does not have a poll syscall). SEE ALSO
select(2), select_tut(2) Linux 2.1.23 1997-12-07 POLL(2)