All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marco Jackel <ich@domain.hid>
To: xenomai@xenomai.org
Subject: [Xenomai-help] Re: problem with reading from rt_pipe with a normal linux process
Date: Thu, 03 Aug 2006 09:10:59 +0200	[thread overview]
Message-ID: <eas7hg$umm$1@domain.hid> (raw)
In-Reply-To: <44D0FF4C.9090006@domain.hid>

Jan Kiszka wrote:
> Marco Jackel wrote:
>> Jan Kiszka wrote:
>>> Hint: read returns its error code in errno. What does that one tell you?
>> read returns -1, "operation not permitted"
>>
> 
> errno == EPERM? A bit weird. Try strace'ing both your program and the
> cat tool to look for a difference.
strace says "-1" in this case is ENOBUFS

The failure in my programm is that it writes binary data to a pipe with
rt_pipe_write (preserves message boundary) and normal linux process
wants to read it byte by byte with read(). Read wants to receive the
whole message, but the message is bigger than 1 byte, so it returns ENOBUFS.

The solution is to use rt_pipe_stream (don't preserves message
boundary). Do I have to use rt_pipe_alloc before? Is there a small
sample program somewhere?


Thanks,
Marco



  reply	other threads:[~2006-08-03  7:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-02 18:46 [Xenomai-help] problem with reading from rt_pipe with a normal linux process Marco Jackel
2006-08-02 18:53 ` [Xenomai-help] " Marco Jackel
2006-08-02 18:58   ` Jan Kiszka
2006-08-02 19:07     ` Marco Jackel
2006-08-02 19:38       ` Jan Kiszka
2006-08-03  7:10         ` Marco Jackel [this message]
2006-08-03 17:46           ` Philippe Gerum

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='eas7hg$umm$1@domain.hid' \
    --to=ich@domain.hid \
    --cc=xenomai@xenomai.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.