From: sean finney <seanius@seanius.net>
To: linux-kernel@vger.kernel.org
Subject: problem opening multiple pipes with pipe(2) in 2.4.1[78]
Date: Mon, 21 Oct 2002 21:32:20 -0400 [thread overview]
Message-ID: <20021021213220.A26136@sccs.swarthmore.edu> (raw)
[-- Attachment #1: Type: text/plain, Size: 1172 bytes --]
hi everyone
i'm not sure whether i should be sending this here or to some libc
mailing list, but i couldn't seem to find the code for pipe(2) in libc
so i'm assuming it's in the kernel.
i have a simple program that illustrates a problem i'm having in a more
complex program. if i try to open multiple pipes with calls to pipe(),
Really Wierd Stuff seems to start happening:
#include <unistd.h>
int main(){
int p1[2], p2[2];
pipe(p1);
perror("p1");
pipe(p2);
perror("p2");
return 0;
}
produces the following output:
oil[~]21:22:03$ ./a.out
p1b: Success
p2b: Illegal seek
i'm really confused here. first of all, pipe's manpage doesn't say
anything about setting errno to ESPIPE (which is what it's doing), and
secondly, PIPE IS RETURNING 0. i just spent the past 4 hours trying to
figure why my program was segfaulting before i got to this, which is
even more frustrating because i was checking for errors from the result
of pipe().
so i'm hoping i've just completely overlooked something and someone will
be able to point out the error of my ways. any advice or pointers would
really be appreciated, thanks
--sean
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
next reply other threads:[~2002-10-22 1:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-22 1:32 sean finney [this message]
2002-10-22 2:16 ` Ulrich Drepper
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=20021021213220.A26136@sccs.swarthmore.edu \
--to=seanius@seanius.net \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®