Re: about two-way pipes or threads
- From: Ronald Bultje <rbultje ronald bitfreak net>
- To: gtk-list gnome org
- Subject: Re: about two-way pipes or threads
- Date: Mon, 12 Feb 2001 17:40:32 +0100
On 2001.02.12 02:42:58 +0100 Paul Davis wrote:
> >Okay. I included some of the functions in here.
> >It's quite a lot. Let's hope this is enough...
> >Let's go with the source. Here it is (the stuff that matters, I think).
> If
> >you need more, ask again :)
>
> i don't see anywhere that you set the pipes to be non-blocking. not
> doing this will cause lavrec_input() to block indefinitely if no (or
> insufficient) data is available. use fcntl() to change the flags on
> the pipe.
>
Hmmmmm that works now.... Looks nice.......
Problem: somewhere in the input text, I see all kind of weird chars. If I
quit my own app, my console output starts looking like this:
-----------------------------------------------
[....normal output....]
Error: Error initializing Audio
Error: Audio task died. Reason: Error setting sound rate
Command returned <----- (my own msg to show that the pipe task is done)
¿±{@
T L S .
[ @ _ -0.1.2]$ <----- (so this is now my terminal,
charset is different....(?) )
-----------------------------------------------------
Okay. This is not so bad, close terminal, start new one.
Then, my kernel crashes with these errors:
------------------------------------------------------
Code: 0f 0b 83 c4 0c 8b 53 04 8b 03 89 50 04 89 02 89 ea 8b 2d 38
kernel BUG at swap.c:183!
invalid operand: 0000
CPU: 0
EIP: 0010:[<c0129b06>]
EFLAGS: 00010282
eax: 0000001a ebx: c12080c4 ecx: 00000001 edx: c022c888
esi: c12080c4 edi: 00000043 ebp: 00000001 esp: c12e9fa0
ds: 0018 es: 0018 ss: 0018
Process kswapd (pid: 3, stackpage=c12e9000)
Stack: c01f42c5 c01f4440 000000b7 c12080e0 c012b2e9 c12080c4 00010f00
c0231300
00000006 0008e000 c012b666 00000006 00000000 c0105000 0008e000
00000000
c0270018 c0270018 c1229fb4 c0105000 c01074b6 00000000 c012b5f0
c0243fc4
Call Trace: [<c012b2e9>] [<c012b666>] [<c0105000>] [<c0105000>]
[<c01074b6>] [<c012b5f0>]
Code: 0f 0b 83 c4 0c 8b 43 18 83 e0 40 75 14 8b 43 18 a9 80 00 00
------------------------------------------------------
Could be worse, but it gives this response at EVERY command. So I need to
reset....
Any clue?
I thought that maybe, I need to close the pipe (out_pipe, inp_pipe) when
it's finished. Is this just close(out_pipe); and close(inp_pipe); ? And
where would I issue these commands?
Ronald
--
---------------------------------------------------.
-- .-. | Ronald Bultje |
-- /V\ | Running: Linux 2.4.1 and OpenBSD 2.8 |
-- // \\ | E-mail : rbultje ronald bitfreak net |
-- /( )\ | WWW : http://ronald.bitfreak.net/ |
-- ^^-^^ | *** Warning: Unix Addicted *** |
---------------------------------------------------'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]