From: Joel âcheskyâ Salomon <JoelCSalomon@Gmail.com>
To: 9fans@cse.psu.edu
Subject: [9fans] handling notes
Date: Tue, 10 Oct 2006 23:30:56 -0400 [thread overview]
Message-ID: <cacac24c6a8c9a92718f9fee727bf88d@plan9.jp> (raw)
I'm doing an exercise for my Operating Systems class here at Cooper, and I'm supposed to be catching signals. The professor was nice enough to let me catch notes on Plan 9 if I could make that work.
The code is at <http://www.tip9ug/who/chesky/src/katp.c> and <http://www.tip9ug/who/chesky/src/wdp.c>. Basically, katp installs a note handler with atnotify then spawns a pager to catenate its command-line aguments to. Wdp, the World’s Dumbest Pager, reads a single ½KB chunk from stdin then closes it and exits.
Eventually, katp is supposed to recognize that the pipe is closed and respawn wdp; I’m not there yet. Right now, I can’t get the note handler to print anything on pipe close. If I add a sleep(long time) somewhere and interrupt it, the handler reports it; just not for the closed pipe.
What am I missing or doing wrong?
Thanks,
--Joel
next reply other threads:[~2006-10-11 3:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-11 3:30 Joel “chesky” Salomon [this message]
2006-10-11 4:35 ` Russ Cox
2006-10-11 7:52 ` Joel “chesky” Salomon
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=cacac24c6a8c9a92718f9fee727bf88d@plan9.jp \
--to=joelcsalomon@gmail.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).