From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4378D175.7010304@domain.hid> Date: Mon, 14 Nov 2005 19:03:33 +0100 From: =?ISO-8859-1?Q?Ignacio_Garc=EDa_P=E9rez?= MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Xenomai-help] Strange pipe behaviour List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: xenomai@xenomai.org Hi, I have the following piece of code: RT_PIPE_MSG *msg; while ((r = rt_pipe_receive(&mypipe, &msg, TM_INFINITE)) >= 0) { /* whatever */ rt_pipe_free(msg); } When that thread enters, it blocks, as expected, in the rt_pipe_receive call. Then, from user space, I do: echo -en "\x00" > /dev/rtp0 What happens is: 1- rt_pipe_receive returns with r >= 0. 2- /* whatever */ 3- Message is freed using rt_pipe_free. 4- Next call to rt_pipe_receive returns with r = -EINTR. The only explanation I could come up with is that when the pipe is closed by the user mode process, the rt_pipe_receive tells the rt task by returning -EINTR. Is this right?. According to the docs, -EINTR is only returned if rt_task_unblock() has been called... Nacho.