9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] lib9p
@ 2001-12-18  4:50 YAMANASHI Takeshi
  0 siblings, 0 replies; 11+ messages in thread
From: YAMANASHI Takeshi @ 2001-12-18  4:50 UTC (permalink / raw)
  To: 9fans

I'm building a file server program on lib9p.

On providing the client read function, is it OK that the parent
process forks off a child and returns imediately, while the
child calls the respond() funtion after having done blocking
read() or something?  I'm concerning about the variable
'long *count' passed to srv->read() function for the sake of
returning the count of bytes.

I found srv() is calling the client read function as
	srv->read(r, r->fid, r->rbuf, &r->fcall.count, r->fcall.offset);
in /sys/src/lib9p/srv.c and doesn't care '*count' at all
after that.

So I think it's OK for the present.  But can I rely on it?
--
Sincerely,
YAMANASHI Takeshi


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] lib9p
  2001-12-20  2:31 okamoto
@ 2001-12-21  9:58 ` David Rubin
  0 siblings, 0 replies; 11+ messages in thread
From: David Rubin @ 2001-12-21  9:58 UTC (permalink / raw)
  To: 9fans

okamoto@granite.cias.osakafu-u.ac.jp wrote:

> 'fuga' may come from Sebastian Bach!!!  :-)

...formally of Skid Row. He's playing in The Rocky Horror Show on
Broadway. If you can get backstage, you can ask him yourself :-)

	david

--
If 91 were prime, it would be a counterexample to your conjecture.
    -- Bruce Wheeler


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] lib9p
@ 2001-12-20  2:31 okamoto
  2001-12-21  9:58 ` David Rubin
  0 siblings, 1 reply; 11+ messages in thread
From: okamoto @ 2001-12-20  2:31 UTC (permalink / raw)
  To: 9fans

>such a thing, hoge, fuga, honyarara, hogege, etc, etc.

I seem to get right of the origin honyarara...
'fuga' may come from Sebastian Bach!!!  :-)

Kenji



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] lib9p
  2001-12-20  1:59 okamoto
@ 2001-12-20  2:25 ` YAMANASHI Takeshi
  0 siblings, 0 replies; 11+ messages in thread
From: YAMANASHI Takeshi @ 2001-12-20  2:25 UTC (permalink / raw)
  To: 9fans

> I often see this usage of 'hoge' in Japanese BBS.   Do you know the
> origin of that word?   I can't image it. ^_^

Don't know the origin, but I remeber my supervisor
TADA Yoshikatsu, Assistant Professor used a lot of
such a thing, hoge, fuga, honyarara, hogege, etc, etc.
--
YAMANASHI Takeshi


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] lib9p
@ 2001-12-20  1:59 okamoto
  2001-12-20  2:25 ` YAMANASHI Takeshi
  0 siblings, 1 reply; 11+ messages in thread
From: okamoto @ 2001-12-20  1:59 UTC (permalink / raw)
  To: 9fans

>I often use "hoge" as a japanese substituion for

I often see this usage of 'hoge' in Japanese BBS.   Do you know the
origin of that word?   I can't image it. ^_^

Kenji



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] lib9p
  2001-12-19 14:04   ` David Rubin
@ 2001-12-20  0:22     ` YAMANASHI Takeshi
  0 siblings, 0 replies; 11+ messages in thread
From: YAMANASHI Takeshi @ 2001-12-20  0:22 UTC (permalink / raw)
  To: 9fans

> What is "hoge" in srvread?

I often use "hoge" as a japanese substituion for
"foo", "bar" or such.  It seems easier to type
than foo, for me, at least. :)
--
YAMANASHI Takeshi


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] lib9p
  2001-12-18  8:17 ` YAMANASHI Takeshi
@ 2001-12-19 14:04   ` David Rubin
  2001-12-20  0:22     ` YAMANASHI Takeshi
  0 siblings, 1 reply; 11+ messages in thread
From: David Rubin @ 2001-12-19 14:04 UTC (permalink / raw)
  To: 9fans

YAMANASHI Takeshi wrote:

>         term% hget http://bata.cc.titech.ac.jp/uncover/liking/plan9/cursehide.tgz | gunzip | tar x

What is "hoge" in srvread?

	david

--
If 91 were prime, it would be a counterexample to your conjecture.
    -- Bruce Wheeler


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] lib9p
  2001-12-18 16:31 Russ Cox
@ 2001-12-19  4:46 ` YAMANASHI Takeshi
  0 siblings, 0 replies; 11+ messages in thread
From: YAMANASHI Takeshi @ 2001-12-19  4:46 UTC (permalink / raw)
  To: 9fans

Hi.

> After you
> respond to a flush request you have to make sure that
> r->oldreq will never get responded to.

I agree.  I'm pondering whether to make the parent to
kill the appropriate child in srv->flush(), or to make
the child to check validity of a Req *req before
calling respond(). Hmmm.
--
YAMANASHI Takeshi


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] lib9p
@ 2001-12-18 16:31 Russ Cox
  2001-12-19  4:46 ` YAMANASHI Takeshi
  0 siblings, 1 reply; 11+ messages in thread
From: Russ Cox @ 2001-12-18 16:31 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 389 bytes --]

> When a program (acme in the above example) exits,
> the server fails on the assertion:
> 	assert failed: r == nr
> in lib9p.  I think I must make sure that 'Req *req'
> is valid before the child process calls respond().

See the discussion of flush in the man page.  After you
respond to a flush request you have to make sure that
r->oldreq will never get responded to.

Russ

[-- Attachment #2: Type: message/rfc822, Size: 2500 bytes --]

From: YAMANASHI Takeshi <uncover@beat.cc.titech.ac.jp>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] lib9p
Date: Tue, 18 Dec 2001 17:17:11 +0900
Message-ID: <12942.1008663431@beat.cc.titech.ac.jp>

From: "Russ Cox" <rsc@plan9.bell-labs.com>
> Sure, that's okay.

I got assured.

Now that I've finished my first Plan 9 file server,
I would like to let it go to the list.

try:
	term% hget http://bata.cc.titech.ac.jp/uncover/liking/plan9/cursehide.tgz | gunzip | tar x
	term% cd cursehide; mk install
	term% cursehide; acme

This server serves /dev/^(mouse cons cursor), hides the
mouse cursor on a keyboard input, and shows it again on
a mouse movement.

KNOWN BUG:
 When a program (acme in the above example) exits,
the server fails on the assertion:
	assert failed: r == nr
in lib9p.  I think I must make sure that 'Req *req'
is valid before the child process calls respond().
--
Sincerely,
YAMANASHI Takeshi

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] lib9p
  2001-12-18  5:00 Russ Cox
@ 2001-12-18  8:17 ` YAMANASHI Takeshi
  2001-12-19 14:04   ` David Rubin
  0 siblings, 1 reply; 11+ messages in thread
From: YAMANASHI Takeshi @ 2001-12-18  8:17 UTC (permalink / raw)
  To: 9fans

From: "Russ Cox" <rsc@plan9.bell-labs.com>
> Sure, that's okay.

I got assured.

Now that I've finished my first Plan 9 file server,
I would like to let it go to the list.

try:
	term% hget http://bata.cc.titech.ac.jp/uncover/liking/plan9/cursehide.tgz | gunzip | tar x
	term% cd cursehide; mk install
	term% cursehide; acme

This server serves /dev/^(mouse cons cursor), hides the
mouse cursor on a keyboard input, and shows it again on
a mouse movement.

KNOWN BUG:
 When a program (acme in the above example) exits,
the server fails on the assertion:
	assert failed: r == nr
in lib9p.  I think I must make sure that 'Req *req'
is valid before the child process calls respond().
--
Sincerely,
YAMANASHI Takeshi


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [9fans] lib9p
@ 2001-12-18  5:00 Russ Cox
  2001-12-18  8:17 ` YAMANASHI Takeshi
  0 siblings, 1 reply; 11+ messages in thread
From: Russ Cox @ 2001-12-18  5:00 UTC (permalink / raw)
  To: 9fans

Sure, that's okay.  It does care about count
afterward: the Req r sticks around until you call
respond, at which point r->fcall.count gets used
in the response.

Russ


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2001-12-21  9:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-18  4:50 [9fans] lib9p YAMANASHI Takeshi
2001-12-18  5:00 Russ Cox
2001-12-18  8:17 ` YAMANASHI Takeshi
2001-12-19 14:04   ` David Rubin
2001-12-20  0:22     ` YAMANASHI Takeshi
2001-12-18 16:31 Russ Cox
2001-12-19  4:46 ` YAMANASHI Takeshi
2001-12-20  1:59 okamoto
2001-12-20  2:25 ` YAMANASHI Takeshi
2001-12-20  2:31 okamoto
2001-12-21  9:58 ` David Rubin

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).