From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <861e00959300a81619b5f8229a24bc34@gmx.de> To: 9fans@9fans.net Date: Tue, 14 Jul 2009 21:01:09 +0200 From: cinap_lenrek@gmx.de In-Reply-To: <4A5CC347.7080806@tecmav.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-tnkwtmrnbfzxrajlpduhqowlth" Subject: Re: [9fans] A question about timeout Topicbox-Message-UUID: 2071d826-ead5-11e9-9d60-3106f5b1d025 This is a multi-part message in MIME format. --upas-tnkwtmrnbfzxrajlpduhqowlth Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit its best to look at the manpage for the function to check what happens in the case of interruption. but they usualy just return -1 and set errstr will contain the string "interrupted". plan9 does no syscall restarting. read notify(2) and thread(2). -- cinap --upas-tnkwtmrnbfzxrajlpduhqowlth Content-Type: message/rfc822 Content-Disposition: inline Return-Path: <9fans-bounces+cinap_lenrek=gmx.de@9fans.net> X-Flags: 0000 Delivered-To: GMX delivery to cinap_lenrek@gmx.de Received: (qmail invoked by alias); 14 Jul 2009 17:45:35 -0000 Received: from gouda.swtch.com (EHLO gouda.swtch.com) [67.207.142.3] by mx0.gmx.net (mx048) with SMTP; 14 Jul 2009 19:45:35 +0200 Received: from localhost ([127.0.0.1] helo=gouda.swtch.com) by gouda.swtch.com with esmtp (Exim 4.69) (envelope-from <9fans-bounces@9fans.net>) id 1MQm0X-0005KW-It; Tue, 14 Jul 2009 17:41:37 +0000 Received: from smtp7.aruba.it ([62.149.128.206] helo=smtp3.aruba.it) by gouda.swtch.com with smtp (Exim 4.69) (envelope-from ) id 1MQm0V-0005KQ-4T for 9fans@9fans.net; Tue, 14 Jul 2009 17:41:35 +0000 Received: (qmail 28510 invoked by uid 89); 14 Jul 2009 17:41:23 -0000 Received: from unknown (HELO ?10.11.12.14?) (a.verardo@tecmav.com@213.136.145.12) by smtp3.aruba.it with SMTP; 14 Jul 2009 17:41:23 -0000 Message-ID: <4A5CC347.7080806@tecmav.com> Date: Tue, 14 Jul 2009 19:41:27 +0200 From: Adriano Verardo User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.17) Gecko/20080829 SeaMonkey/1.1.12 MIME-Version: 1.0 To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: smtp3.aruba.it 1.6.2 0/1000/N Subject: Re: [9fans] A question about timeout X-BeenThere: 9fans@9fans.net X-Mailman-Version: 2.1.10 Precedence: list Reply-To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.9fans.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: 9fans-bounces@9fans.net Errors-To: 9fans-bounces+cinap_lenrek=gmx.de@9fans.net X-GMX-Antivirus: 0 (no virus found) X-GMX-Antispam: 0 (Mail was not recognized as spam) X-GMX-UID: dPZrfbJmbGI0JIYxzmRnV5xncmZ1Zhzm cinap_lenrek@gmx.de wrote: > to interrupt on i/o operations you send a note to the process. > for ioproc(2), here is iointerrupt() that does that. for timeouts here is > a alarm() function (see sleep(2)) that will fire a note on you when the alarm expires. > notes should also work for rendezvous()/alt(), but a better way is to include > a timeout/cancel channel in your alt() operation. as a example see > /sys/src/cmd/rio/time.c. here we have a central timer process > that does a sleep and sends a message to channels associated > with timers when they expire. > > -- > cinap Thank you very much. Where can I find the explanation of the interrupted system calls behaviour ? In Unix I sometimes found quite difficult to deal with them. What about Plan9 ? adriano --upas-tnkwtmrnbfzxrajlpduhqowlth--