From: Jeff Anderson-Lee <jonah@eecs.berkeley.edu>
To: x <vectro@yahoo.com>
Cc: Bryan Henderson <hbryan@us.ibm.com>,
frederik@ofb.net, fsdevel <linux-fsdevel@vger.kernel.org>,
Linux-userfs <linux-userfs@vger.kernel.org>
Subject: Re: seekable pipes
Date: Thu, 23 Jun 2005 08:58:20 -0700 [thread overview]
Message-ID: <42BADC1C.9080109@eecs.berkeley.edu> (raw)
In-Reply-To: <20050623150505.62110.qmail@web30215.mail.mud.yahoo.com>
x wrote:
>>In
>>the anonymous case
>>(more precisely, the case of the anonymous pipe
>>generated and deployed by
>>a seekable-pipe-agnostic program such as Bash), you
>>can't make sure the
>>guy who makes the pipe seekable does so before the
>>guy who needs it to be
>>seekable notices that it's not.
>>
>>
>
>OK. This can of course be circumvented by doing
>$ command_that_understands_seekable_pipes |
>(command_that_checks_stdin;
>command_that_requires_seekable_stdin)
>
>But I see how this is something best done in the
>shell.
>
>In any case, you'd need some kind of ioctl to ask the
>kernel to wait for the other end of the pipe to become
>seekable (or be written or closed).
>
To paraphrase: "the wonderful things about shells is that there are so
many to choose from". However one doesn't need to reinvent (or retool)
the entire wheel/shell industry to get started. What about just
starting with a simple "one line" seek-in command that can be called in
such cases as required? If it becomes used enough, shell developers
will eventually absorb it as they did with "test" and "echo", etc.
The syntax could be something like:
$ command_to_manage_seekable_stdout | seek-in [--]
command_to_use_seekable_stdin
Where seek-in pauses briefly to allow the first command to convert the
pipe to seekable mode before execing its arguments. The shell variable
parsing and other redirection is inherited from (managed by) the
surrounding shell. An optional time-out might prevent an infinite wait
if the first command never converted the pipe.
Jeff Anderson-Lee
next prev parent reply other threads:[~2005-06-23 15:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-07 10:23 seekable pipes Frederik Eaton
2005-06-07 20:31 ` Bryan Henderson
2005-06-07 21:56 ` x
2005-06-16 4:37 ` Frederik Eaton
2005-06-20 22:24 ` Bryan Henderson
2005-06-21 5:02 ` Frederik Eaton
2005-06-21 17:47 ` Bryan Henderson
2005-06-21 22:41 ` x
2005-06-22 0:53 ` Bryan Henderson
2005-06-23 15:05 ` x
2005-06-23 15:58 ` Jeff Anderson-Lee [this message]
2005-06-23 17:03 ` Bryan Henderson
2005-06-24 5:43 ` Frederik Eaton
[not found] <20041128120006.312.69326.Mailman@lists.us.dell.com>
2004-11-29 5:02 ` Seekable pipes Richard Patterson
-- strict thread matches above, loose matches on Subject: below --
2004-11-27 5:48 Richard Patterson
2004-11-27 19:45 ` Jan Engelhardt
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=42BADC1C.9080109@eecs.berkeley.edu \
--to=jonah@eecs.berkeley.edu \
--cc=frederik@ofb.net \
--cc=hbryan@us.ibm.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-userfs@vger.kernel.org \
--cc=vectro@yahoo.com \
/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.