From: Rob Landley <telomerase@yahoo.com>
To: Michael Meissner <meissner@spectacle-pond.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: How do I make a circular pipe?
Date: Sat, 14 Apr 2001 10:44:46 -0700 (PDT) [thread overview]
Message-ID: <20010414174446.26073.qmail@web5203.mail.yahoo.com> (raw)
In-Reply-To: <20010413235028.B4197@munchkin.spectacle-pond.org>
> > Apparently, the pipe
> > fd's evaporate when the process does an execve.
>
> Check out:
>
> #include <unistd.h>
> #include <fcntl.h>
>
> /* ... */
>
> fcntl (fd, F_SETFD, (long) FD_CLOEXEC);
>
> to set/reset the close on exec bit.
Cool. That's EXACTLY what I was looking for. Thanks.
Thanks also to the people who pointed out pppd's "pty"
option (yes I read the docs on that, but they're a bit
cryptic). And yes, my pseudo-code example used fd[0]
twice. Thanks. You can stop emailing me now. :)
> You might want to check out something like Stevens
> advanced UNIX programming, though it is probably
> somewhat dated :-)
I've got about fifteen books with names like that, but
strangely in real world situations I keep trying to
use the man pages instead. Sad, I know...
> At a guess I would say that the reason is you don't
> have as much control with pipes as you do with
> devices. Under the standard termios, you can tell
> the system to not return from the read until either
n
> characters have been read, or a given character such
> as a newline has been read. You can also switch to
> alternative line disciplines that are more targeted
> to a given application such as PPP, etc.
Hmmm. And the reason these cool toys aren't available
as some kind of wrapper around a normal read-from-fd
is...? (Performance?)
> You probably want to check out pseudo tty's (pty's),
> which allow you to create your own terminal.
This occurred to me in the car on the way home after
five hours messing with this. (Of course. :)
> Here is the glibc documentation,
Thanks.
Info. Never thought to check info. Here I am
checking linuxdoc's howtos, man pages, and google...
Sigh... I don't suppose there's an info2html tool
anywhere?
Well what do you know, there is. (I LIKE Google.)
http://www.cs.dartmouth.edu/~jonh/info2html/
Rob
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/
next prev parent reply other threads:[~2001-04-14 17:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-14 1:05 Rob Landley
2001-04-14 3:50 ` Michael Meissner
2001-04-14 17:44 ` Rob Landley [this message]
2001-04-14 23:58 ` bert hubert
2001-04-17 8:02 ` johan.adolfsson
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=20010414174446.26073.qmail@web5203.mail.yahoo.com \
--to=telomerase@yahoo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=meissner@spectacle-pond.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®