Re: permanent callback call when using XtAddAppInput
From: Chuck Dillon (spam_at_nimblegen.com)
Date: 09/29/05
- Next message: Charris: "Problem with getch and nodelay, backspace key"
- Previous message: Chuck Dillon: "Re: ssh remote execution"
- In reply to: Steffen Christgau: "permanent callback call when using XtAddAppInput"
- Next in thread: Steffen Christgau: "Re: permanent callback call when using XtAddAppInput"
- Reply: Steffen Christgau: "Re: permanent callback call when using XtAddAppInput"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 29 Sep 2005 08:42:59 -0500
Steffen Christgau wrote:
> RoTimingPipe = open(RO_PKG_PIPE_LPATH RO_PKG_CLNT_TMG_PIPE,
> O_RDONLY | O_NONBLOCK);
>
> The problem is, that the callback function (TimingEventCallBack) is
> called permanently as soon some data has been available on the pipe,
> although the pipe was emptied afterwards. Due to this the process claims
> approx. 100% of the CPU. Has anyone an idea what's the reason - and
> maybe a solution - for this unpleasant effect ?
I believe your problem is you've opened it as non-blocking.
XtAppAddInput on *nix calls select() which tells you if your process
would block if you read from a descriptor. In non-blocking mode that's
always true.
BTW, the comp.windows.x* groups including comp.windows.x.motif is a
good place to ask for advice on X.
-- ced
-- Chuck Dillon Senior Software Engineer NimbleGen Systems Inc.
- Next message: Charris: "Problem with getch and nodelay, backspace key"
- Previous message: Chuck Dillon: "Re: ssh remote execution"
- In reply to: Steffen Christgau: "permanent callback call when using XtAddAppInput"
- Next in thread: Steffen Christgau: "Re: permanent callback call when using XtAddAppInput"
- Reply: Steffen Christgau: "Re: permanent callback call when using XtAddAppInput"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]