public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [Linux-ia64] pipe() not setting errno.
@ 2002-04-04 11:48 Anders Herbjørnsen
  2002-04-04 13:36 ` Andreas Schwab
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Anders Herbjørnsen @ 2002-04-04 11:48 UTC (permalink / raw)
  To: linux-ia64

Hello,

When running out of file descriptors pipe() does return -1 but
errno is not set. This is working ok on IA32 systems, but fails
on IA64. I've tested this with kernels 2.4.9 and 2.4.18.

Below is a small sample program to illustrate the problem:

########################################################
#include <stdio.h>
#include <errno.h>
#include <unistd.h>

int main (int argc, char **argv){
  int i;
  for (i = 0; i < 3000; i++) {
    int fd[2];
    if (-1 = pipe(fd))
      break;
    printf ("%d ", i);
  } /* for */
  printf ("\npipe number %d error: errno=%d\n", i, errno);
  return errno;
}
#############################################################

Sample run:

$ ulimit -n 12
$ ./tpipe
0 1 2 3
pipe number 4 error: errno=0

Regards
Anders Herbjørnsen





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-04-05 16:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-04 11:48 [Linux-ia64] pipe() not setting errno Anders Herbjørnsen
2002-04-04 13:36 ` Andreas Schwab
2002-04-05 14:02 ` Anders Herbjørnsen
2002-04-05 16:44 ` Ulrich Drepper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox