473,623 Members | 3,366 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1344
On Feb 15, 2:51 am, Marco <m...@waven.com wrote:
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3235
by: M Herriott | last post by:
Hello to all - #1: I would have rather used an AND with the choice of newsgroups. I would like to talk to those who subscribe to comp.lang.c++ AND comp.unix.solaris - but I'm stuck with OR. Please accept my sincerest apologies for what I am about to do, I know it is, in the purest sense, incorrect. Having said that much, let me describe my problem. I am running two processes on a Solaris server. Process 1 forks and calls process 2...
9
1266
by: misaki | last post by:
Hi all! My name Hùng. I'm a new member. I'm from Viet Nam. I want to ask "How to write a service program that can call and run a script?". Please tell me about this. Thank you very much. Goodbyel.
7
7899
by: Gernot Frisch | last post by:
Hi, I want to have a representative information about the read and write speeds of a drive (cf-card, HDD and RAM-Disk). I think the buffering of the filesystem must be fooled somehow for my test program (sorry, uses GetTickCount() == Win32 for Milliseconds) # # #
46
3830
by: Steven T. Hatton | last post by:
I just read §2.11.3 of D&E, and I have to say, I'm quite puzzled by what it says. http://java.sun.com/docs/books/tutorial/essential/concurrency/syncrgb.html <shrug> -- NOUN:1. Money or property bequeathed to another by will. 2. Something handed down from an ancestor or a predecessor or from the past: a legacy of religious freedom. ETYMOLOGY: MidE legacie, office of a deputy, from OF, from ML legatia, from L legare, to depute, bequeath....
30
32339
by: Mike C# | last post by:
Hi all, anyone know if there are any Windows functions to retrieve CPU Fan Speed and CPU Temp? Or if it's a BIOS-level call, or something else? If someone out there could just point me in the right direction it would be appreciated. Thanks!
8
2478
by: svata | last post by:
Hello, as I'm new to python I've stumbled accros os.system and its not very well documented usage. I use Win XP Pro and Python 2.5. Here is the code snippet: --------------------------------------------------------------------------------------------------
7
4049
by: Udhay | last post by:
How to get the frequency of an audio file and how to separate the low and high frequency of an audio file
8
3561
by: grikdog | last post by:
How to I capture stdout output from a system call and pipe it back into my running script? system "echo foobar"; # how to continue here with "foobar" in stdin ?? ... I can fake it with pipes and additional scripts, but that seems like overkill.
0
1459
by: =?Utf-8?B?QnJ5YW4=?= | last post by:
Hello group. I've migrated from Win 2003 server to Win 2008 server. I've been banging my head agaist a wall for several days now trying to figure this out. I have the following script that will search the file system and return file names of all files within a folder and subfolders that meet the search criteria of DateLastModified. To test the output, you can use the following link:
0
8162
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8317
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7134
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6104
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5560
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4067
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2593
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1769
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1468
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.