9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: rog@vitanuova.com
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Okay, who's been playing with the cheese wiz?
Date: Mon, 10 Feb 2003 13:14:18 +0000	[thread overview]
Message-ID: <3d4c69fd5fe4e31a00c344b8faf39623@vitanuova.com> (raw)

> I gave up on execnet a long time ago.  It's clunky
> and not clear that the interface should work that
> way.  What do you use it for?  (I'm just curious.)

for what it was used for, i couldn't see what was wrong with just
posting a named pipe to the command into /srv, assuming that the
command could serve 9p on its standard input.

in fact, it would seem to me to be a good idea to let all file server
commands serve 9p through stdin; then they can be mounted simply with:

mount >{command} /mnt/xxx

the command doesn't have to parse all those mount options or know
where it might be mounted, and you don't have to worry about
backgrounding it and then worrying whether it might not have mounted
in time.  (plus it's more versatile).

the original execnet stuff (assuming i understood what it was about)
could have been done with something like:

postsrv u9fs >{ssh ny 'u9fs -na none -u $USER -l $HOME/tmp/u9fs.log'}

(assuming the following command; maybe there is a similar command
somewhere else?):

/* postsrv.c */
#include <u.h>
#include <libc.h>

void main(int argc, char**argv)
{
	char buf[256];
	int fd, srvfd;
	if (argc != 3) {
		fprint(2, "usage: postsrv srvname file\n");
		exits("usage");
	}
	fd = open(argv[2], ORDWR);
	if (fd == -1) {
		fprint(2, "postsrv: cannot open %s: %r\n", argv[2]);
		exits("error");
	}
	snprint(buf, sizeof(buf), "/srv/%s", argv[1]);
	srvfd = create(buf, OWRITE, 0666);
	if (srvfd == -1) {
		fprint(2, "postsrv: cannot create %s: %r\n", buf);
		exits("error");
	}
	if (fprint(srvfd, "%d", fd) == -1) {
		fprint(2, "postsrv: cannot post %d: %r\n", fd);
		exits("error");
	}
}



             reply	other threads:[~2003-02-10 13:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-10 13:14 rog [this message]
2003-02-10 13:36 ` Russ Cox
  -- strict thread matches above, loose matches on Subject: below --
2003-02-10 17:09 rog
2003-02-10 17:10 ` Russ Cox
2003-02-10  4:19 okamoto
2003-02-09 21:20 Dan Cross
2003-02-09 21:51 ` Russ Cox
2003-02-10 16:24   ` Dan Cross
2003-02-10  1:07 ` rob pike, esq.
2003-02-18  3:49 ` Russ Cox
2003-02-18  3:55   ` Sam
2003-02-18  4:02     ` Russ Cox
2003-02-18  4:00   ` Dan Cross

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=3d4c69fd5fe4e31a00c344b8faf39623@vitanuova.com \
    --to=rog@vitanuova.com \
    --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).