9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: okamoto@granite.cias.osakafu-u.ac.jp okamoto@granite.cias.osakafu-u.ac.jp
Subject: [9fans] Alef program to fork and exec say program
Date: Thu, 13 May 1999 18:11:46 +0900	[thread overview]
Message-ID: <19990513091146.93LEm1Soq_9NKoV_bM8u_GC6MPxO5a4XfFgH3XeAwvg@z> (raw)

I'm trying to make my PC termianl read the From header
for a new incoming mail.

After reading the sources in /acme/mail/src, I made small
changes to the function Box.readmore() in box.l like as:

in while() loop to read new comming mails,
	new = true;
	say(buf);      <----added line

and 

defined say() in the box.l file like

void
say(byte *msg)
{
	rfork(RFENVG|RFFDG|RFNOTEG|RFMEM);
	execl("/bin/pub/say", "-l /dev/audio -C 2", "New mail arrived
			from ", msg);
}

After above change, (I really don't know whether the flags 
for rfork() are approapriate) the rsynth program reads and 
speaks! the "From" and "Subject" line when a new mail arrived 
to me.  
However, after that, the Mail program goes into mad, and I 
cann't end the session clearly.
Then, I searched the on-line manuals, and found something
notices for exec() in Alef environment, saying exec() may be
called only from the mail task....

If I want to fork/exec a new program like the present case,
can I do it otherwise?

Kenji




             reply	other threads:[~1999-05-13  9:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-13  9:11 okamoto [this message]
1999-05-13 10:02 rog
1999-05-13 10:27 okamoto

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=19990513091146.93LEm1Soq_9NKoV_bM8u_GC6MPxO5a4XfFgH3XeAwvg@z \
    --to=okamoto@granite.cias.osakafu-u.ac.jp \
    /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).