From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 13 May 1999 18:11:46 +0900 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 Topicbox-Message-UUID: 9657eace-eac8-11e9-9e20-41e7f4b1d025 Message-ID: <19990513091146.93LEm1Soq_9NKoV_bM8u_GC6MPxO5a4XfFgH3XeAwvg@z> 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