RE: pipe() syscall on ia64 (tiger) doesn't set errno to EMFILE
"digiovanni, lucio" <[email protected]> Thu, 24 Apr 2003 13:32:52 -0400
| Newsgroups | gmane.linux.redhat.ia64.general |
|---|---|
| Message-ID | <[email protected]> |
Do you mean npipes instead of pipes as the index?
pipe_ret = pipe(npipes);
Instead of
pipe_ret = pipe(pipes);
-Lu
-----Original Message-----
From: Jacky Malcles [mailto:[email protected]]
Sent: Thursday, April 24, 2003 3:48 AM
To: [email protected]
Subject: pipe() syscall on ia64 (tiger) doesn't set errno to EMFILE
Can someone please tell me what is wrong with this:
/* expecting errno set to EMFILE but it isn't */
#include <unistd.h>
#include <stdio.h>
#include <fcntl.h>
#include <errno.h>
int pipe_ret, pipes[2];
int main(int ac, char **av)
{
int npipes; /* number of pipes opened */
for (npipes = 0; ; npipes++) {
/*errno=-EMFILE;*/
pipe_ret = pipe(pipes);
/*printf(" errno = %d \n",errno);*/
if (pipe_ret < 0) {
printf("errno set to EMFILE %d
\n",errno);
printf(" npipes = %d \n",npipes);
break;
}
}
return 0;
}
running it i get:
[root@cza pipe]# pipe12
errno set to EMFILE 0
npipes = 510
[root@cza pipe]#
I think i should get, something like:
errno set to EMFILE 24
npipes = 510
I currently have:
Red Hat Linux release 7.2 (Enigma)
Gnu C 2.96
Gnu make 3.79.1
binutils 2.11.90.0.8
util-linux 2.11f
mount 2.11g
modutils 2.4.10
e2fsprogs 1.23
reiserfsprogs 3.x.0j
Linux C Library 2.2.4
Dynamic linker (ldd) 2.2.4
Procps 2.0.11
Net-tools 1.60
Console-tools 0.3.3
Sh-utils 2.0.11
/proc/cpuinfo
processor : 0
vendor : GenuineIntel
arch : IA-64
family : Itanium 2
...etc..
Linux version 2.5.64
thank you for your help,
Jacky Malcles Email : [email protected]
Tel : 04.76.29.73.14