From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: [9fans] bad juju in devproc.c
Date: Mon, 17 Jan 2011 22:39:46 -0500 [thread overview]
Message-ID: <8bbc5989dbab94e0b47d3192d4f2048f@chula.quanstro.net> (raw)
subtitle: hard linking, chan style.
if you do the chan switcheroo,
you must close the orphan, too.
; diffy -c devproc.c
/n/dump/2011/0117/sys/src/9/port/devproc.c:387,392 - devproc.c:387,393
tc->offset = 0;
qunlock(&p->debug);
poperror();
+ cclose(c);
return tc;
case Qproc:
/n/dump/2011/0117/sys/src/9/port/devproc.c:1183,1190 - devproc.c:1184,1193
error(Eprocdied);
}
- if(p->pid != PID(c->qid))
+ if(p->pid != PID(c->qid)){
+ cclose(tc);
error(Eprocdied);
+ }
unlock(i);
poperror();
it's interesting that the naïve expectation is uniformly
that /proc/$pid/text refers to the image cache, not the
original opened channel.
- erik
next reply other threads:[~2011-01-18 3:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-18 3:39 erik quanstrom [this message]
2011-01-18 13:57 ` 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=8bbc5989dbab94e0b47d3192d4f2048f@chula.quanstro.net \
--to=quanstro@quanstro.net \
--cc=9fans@9fans.net \
/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).