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) 						      BSD System Calls Manual							   POLL(2)

NAME
poll -- synchronous I/O multiplexing SYNOPSIS
#include <poll.h> int poll(struct pollfd fds[], nfds_t nfds, int timeout); DESCRIPTION
Poll() examines a set of file descriptors to see if some of them are ready for I/O or if certain events have occurred on them. The fds argu- ment is a pointer to an array of pollfd structures, as defined in <poll.h> (shown below). The nfds argument specifies the size of the fds array. struct pollfd { int fd; /* file descriptor */ short events; /* events to look for */ short revents; /* events returned */ }; The fields of struct pollfd are as follows: fd File descriptor to poll. events Events to poll for. (See below.) revents Events which may occur or have occurred. (See below.) The event bitmasks in events and revents have the following bits: POLLERR An exceptional condition has occurred on the device or socket. This flag is output only, and ignored if present in the input events bitmask. POLLHUP The device or socket has been disconnected. This flag is output only, and ignored if present in the input events bitmask. Note that POLLHUP and POLLOUT are mutually exclusive and should never be present in the revents bitmask at the same time. POLLIN Data other than high priority data may be read without blocking. This is equivalent to ( POLLRDNORM | POLLRDBAND ). POLLNVAL The file descriptor is not open. This flag is output only, and ignored if present in the input events bitmask. POLLOUT Normal data may be written without blocking. This is equivalent to POLLWRNORM. POLLPRI High priority data may be read without blocking. POLLRDBAND Priority data may be read without blocking. POLLRDNORM Normal data may be read without blocking. POLLWRBAND Priority data may be written without blocking. POLLWRNORM Normal data may be written without blocking. The distinction between normal, priority, and high-priority data is specific to particular file types or devices. If timeout is greater than zero, it specifies a maximum interval (in milliseconds) to wait for any file descriptor to become ready. If timeout is zero, then poll() will return without blocking. If the value of timeout is -1, the poll blocks indefinitely. RETURN VALUES
Poll() returns the number of descriptors that are ready for I/O, or -1 if an error occurred. If the time limit expires, poll() returns 0. If poll() returns with an error, including one due to an interrupted call, the fds array will be unmodified and the global variable errno will be set to indicate the error. ERRORS
Poll() will fail if: [EAGAIN] Allocation of internal data structures fails. A subsequent request may succeed. [EFAULT] Fds points outside the process's allocated address space. [EINTR] A signal is delivered before the time limit expires and before any of the selected events occurs. [EINVAL] The nfds argument is greater than OPEN_MAX or the timeout argument is less than -1. BUGS
The poll() system call currently does not support devices. SEE ALSO
accept(2), connect(2), kevent(2), read(2), recv(2), select(2), send(2), write(2) HISTORY
The poll() function call appeared in AT&T System V UNIX. BSD
February 27, 2005 BSD