From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@cse.psu.edu, Russ Cox <rsc@swtch.com>
Subject: Re: [9fans] Plan9Ports libdraw open-in-same-window
Date: Fri, 10 Mar 2006 07:55:00 -0600 [thread overview]
Message-ID: <20060310135500.11CD5118BA@dexter-peak.quanstro.net> (raw)
In-Reply-To: <3fab42bfaa9288c3dd261507296e1370@swtch.com>
semctl(2) is probablly the cleanest way on unix. if things really
get hosed, you can use ipcrm to get rid of the semaphore.
i've never had success with unix locking /really/ working.
however, i think the way to address this (and get what paul's after)
is to split src/libdraw/devdraw.c into two parts. _drawmsgwrite
would really write to "/dev/draw" (a p9p filesystem living in
$NAMESPACE like $NAMESPACE/devdraw.$WINDOWID).
access to the mouse and keyboard would need to be similarly
multiplexed.
window(1) could then provide "/dev/{draw,mouse,cons,consctl,label}";
so rio could run this to start a 9term:
#!/usr/local/bin/rc
WINDOWID=`{window}
if (~ $#WINDOWID 1)
exec the.9term
exit 1
the upside of all this is that window and rio would be the only programs
linked against X. the downside would be extra 9p traffic.
- erik
"Russ Cox" <rsc@swtch.com> writes
|
| > I've been recycling the drawable, but I need to keep a cross-process
| > lock there; what's a good way to keep a lock in P9P?
|
| I didn't answer this. I don't know how to do a cross-process lock.
| Perhaps you could create a temporary file and fcntl lock it.
|
| Russ
next prev parent reply other threads:[~2006-03-10 13:55 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-09 21:36 Paul Lalonde
2006-03-09 21:40 ` Russ Cox
2006-03-09 22:21 ` Paul Lalonde
2006-03-10 0:38 ` Russ Cox
2006-03-10 1:00 ` Paul Lalonde
2006-03-10 1:14 ` Russ Cox
2006-03-10 3:15 ` Paul Lalonde
2006-03-10 3:34 ` Russ Cox
2006-03-10 4:26 ` Paul Lalonde
2006-03-10 3:35 ` Russ Cox
2006-03-10 6:50 ` Bruce Ellis
2006-03-10 14:25 ` Russ Cox
2006-03-10 13:55 ` erik quanstrom [this message]
2006-03-10 14:29 ` Russ Cox
2006-03-10 14:53 ` erik quanstrom
2006-03-10 15:03 ` Russ Cox
2006-03-10 15:21 ` erik quanstrom
2006-03-10 15:26 ` Russ Cox
2006-03-10 17:08 ` erik quanstrom
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=20060310135500.11CD5118BA@dexter-peak.quanstro.net \
--to=quanstro@quanstro.net \
--cc=9fans@cse.psu.edu \
--cc=rsc@swtch.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 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).