469,286 Members | 2,498 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,286 developers. It's quick & easy.

How to write a programe that include both pipe(low speed system call)and signal

Hi,
I have know that signal will interrupt some kind low speed system
call like pipe. But how to design a program that both support signal
and pipe?

I have a mplayer.py to play movie via os.popen2() and mplayer
slave mode. And there is a mplayer_ctl.py send signal to mplayer.py to
trigger function from mplayer.py. Sometimes os.popen2() is reading or
writing when user run mplayer_ctl.py the bad things raise...

Is there some better way to design the programe? Thank you
--
LinuX Power
Feb 15 '07 #1
1 1216
On Feb 15, 2:51 am, Marco <m...@waven.comwrote:
Hi,
I have know that signal will interrupt some kind low speed system
call like pipe. But how to design a program that both support signal
and pipe?

I have a mplayer.py to play movie via os.popen2() and mplayer
slave mode. And there is a mplayer_ctl.py send signal to mplayer.py to
trigger function from mplayer.py. Sometimes os.popen2() is reading or
writing when user run mplayer_ctl.py the bad things raise...

Is there some better way to design the programe? Thank you

--
LinuX Power
Take a look at the subprocess module, which is meant to replace
popen[1,2,3...](). Also, please try to explain the problem again,
because I just can't decypher everything you're trying to do (and
say).

cheers,
Jordan

Feb 15 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Gernot Frisch | last post: by
46 posts views Thread by Steven T. Hatton | last post: by
30 posts views Thread by Mike C# | last post: by
8 posts views Thread by svata | last post: by
7 posts views Thread by Udhay | last post: by
reply views Thread by =?Utf-8?B?QnJ5YW4=?= | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.