From: "Anders Herbjørnsen" <anders.herbjornsen@start.no>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] pipe() not setting errno.
Date: Thu, 04 Apr 2002 11:48:50 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590701905376@msgid-missing> (raw)
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
next reply other threads:[~2002-04-04 11:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-04 11:48 Anders Herbjørnsen [this message]
2002-04-04 13:36 ` [Linux-ia64] pipe() not setting errno Andreas Schwab
2002-04-05 14:02 ` Anders Herbjørnsen
2002-04-05 16:44 ` Ulrich Drepper
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=marc-linux-ia64-105590701905376@msgid-missing \
--to=anders.herbjornsen@start.no \
--cc=linux-ia64@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.