From: "Roman V. Shaposhnick" <vugluskr@unicorn.math.spbu.ru>
To: 9fans@cse.psu.edu
Subject: [9fans] /net like file trees and scripting.
Date: Thu, 3 Oct 2002 06:09:07 +0400 [thread overview]
Message-ID: <20021003060906.A29586@unicorn.math.spbu.ru> (raw)
While doing C programming and using /net/tcp for example in its
raw form ( without dial & co. ) I had no problems whatsoever since
everything was confined in one process.
The problem showed up when I tried to do roughly the same in rc. E.g.:
$ cat t
#!/bin/rc
a=`{cat /net/tcp/clone}
echo -n 'connect lambda!7' > /net/tcp/$a/ctl
cat /net/tcp/$a/status
echo 'hello' > /net/tcp/$a/data
cat /net/tcp/$a/data
$ ./t
Time_wait srtt 0 mdev 0 cwin 1461 swin 24820 rwin 65535 timer.start 200 timer.count 190 rerecv 0
echo: write error: i/o on hungup channel
As far as I can tell, I can't get away with this since /net/tcp/clone is being
closed before /net/tcp/$a/data gets opened and there is no way for me to
change that since first cat and subsequent cats are different process. And
of course they close everything on exit.
Am I doomed to use C in such case, or is there any clever way to trick the
system ?
Thanks,
Roman.
next reply other threads:[~2002-10-03 2:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-03 2:09 Roman V. Shaposhnick [this message]
2002-10-03 2:18 Russ Cox
2002-10-05 8:31 ` Roman V. Shaposhnick
2002-10-05 8:25 Charles Forsyth
2002-10-05 8:45 Geoff Collyer
2002-10-08 23:35 ` Roman V. Shaposhnick
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=20021003060906.A29586@unicorn.math.spbu.ru \
--to=vugluskr@unicorn.math.spbu.ru \
--cc=9fans@cse.psu.edu \
/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;
as well as URLs for NNTP newsgroup(s).