Re: named pipe and Linux

2009-04-12 Thread Cameron Simpson
On 08Apr2009 16:13, Thomas Bellman wrote: | Cameron Simpson wrote: | > On 07Apr2009 10:08, akineko wrote: | >| I'm trying to use named pipes to fuse a Python program and a C | >| program. | >| One side creates pipes using os.mkfifo() and both sides use the same | >| named pipes (one side reads,

Re: named pipe and Linux

2009-04-08 Thread Thomas Bellman
Cameron Simpson wrote: > On 07Apr2009 10:08, akineko wrote: >| I'm trying to use named pipes to fuse a Python program and a C >| program. >| One side creates pipes using os.mkfifo() and both sides use the same >| named pipes (one side reads, another side writes). The read side uses >| select.sel

Re: named pipe and Linux

2009-04-08 Thread bobicanprogram
On Apr 7, 1:08 pm, akineko wrote: > Hello everyone, > > I'm trying to use named pipes to fuse a Python program and a C > program. > One side creates pipes using os.mkfifo() and both sides use the same > named pipes (one side reads, another side writes). The read side uses > select.select() to wait

Re: named pipe and Linux

2009-04-07 Thread akineko
Hello Cameron Simpson, Thank you for your reply. I now think the way I did (using fstat()) was a very bad idea (as you pointed out). I haven't decided how to fix this yet. I also considered attaching the message length to the head of the message. It will work, too. I need to a bit more experiment.

Re: named pipe and Linux

2009-04-07 Thread Lawrence D'Oliveiro
In message <5b5157dd- ca70-4c6d-8adb-8a4d322fb...@x31g2000prc.googlegroups.com>, akineko wrote: > The length of the message is unknown to the read side. I think you want a message-based, not a stream-based, IPC mechanism. Look at the docs on msgctl, msgget, msgop and so on. -- http://mail.pytho

Re: named pipe and Linux

2009-04-07 Thread Cameron Simpson
On 07Apr2009 10:08, akineko wrote: | I'm trying to use named pipes to fuse a Python program and a C | program. | One side creates pipes using os.mkfifo() and both sides use the same | named pipes (one side reads, another side writes). The read side uses | select.select() to wait for incoming messa