[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Howto read a named pipe with Qt4?
From: Robin Atwood <robin () binro ! org>
Date: 2010-06-13 22:27:57
Message-ID: 201006140527.58087.robin () binro ! org
[Download RAW message or body]
On Monday 14 June 2010, Robin Atwood wrote:
> I have created a pipe with mkfifo which is driven by syslog-ng and want to
> read it from my app. Searching always points me to QLocalSocket but when I
> call 'connectToServer()' I get "ConnectionRefusedError".
>
> I tried QFile in Read/Write mode but got no output. I tried a standard
> open() with O_RDWR+O_ASYNC+O_NONBLOCK and passed the fd to QFile but that
> produces no output either. What is the secret to this?
Ah, I finally found a useful hit. The trick is to use QSocketNotifier and the
activated() signal and not QFile's readyRead().
Sorry for the noise!
-Robin
--
----------------------------------------------------------------------
Robin Atwood.
"Ship me somewheres east of Suez, where the best is like the worst,
Where there ain't no Ten Commandments an' a man can raise a thirst"
from "Mandalay" by Rudyard Kipling
----------------------------------------------------------------------
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic