From: Ulrich Drepper <drepper@redhat.com>
To: sean finney <seanius@seanius.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: problem opening multiple pipes with pipe(2) in 2.4.1[78]
Date: Mon, 21 Oct 2002 19:16:55 -0700 [thread overview]
Message-ID: <3DB4B517.1070906@redhat.com> (raw)
In-Reply-To: <20021021213220.A26136@sccs.swarthmore.edu>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
sean finney wrote:
>
> int main(){
> int p1[2], p2[2];
> pipe(p1);
> perror("p1");
> pipe(p2);
> perror("p2");
> return 0;
> }
The fault is entirely yours. You're not allowed to look at errno unless
a function, which is defined to modify error on failure, is reporting it
failed. Both pipe() calls work just fine and errno has some random
value which happens to be ESPIPE for you. Read the standard.
- --
- --------------. ,-. 444 Castro Street
Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA
Red Hat `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE9tLUX2ijCOnn/RHQRAsAvAJoCBHjJY+Fw8ngfW2HeH8i1ozMenwCdH/Zd
49t/9uthYez2yYk4JoYgbrU=
=Ijan
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2002-10-22 2:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-22 1:32 problem opening multiple pipes with pipe(2) in 2.4.1[78] sean finney
2002-10-22 2:16 ` Ulrich Drepper [this message]
2002-10-22 4:39 ` sean finney
2002-10-22 12:43 ` Doug McNaught
2002-10-22 13:23 ` Alan Cox
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=3DB4B517.1070906@redhat.com \
--to=drepper@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=seanius@seanius.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox