In article <[EMAIL PROTECTED]>, Marco <[EMAIL PROTECTED]> wrote:
> Hello,every one, I meet a question: > > in my old script, I usually use os.popen2() to get info from standard > unix(LinuX) program like ps,ifconfig... > > Now, I write a OO-based programme, I still use os.popen2( check > whether mplayer still working via ps command ), but some things I got > the following message: > > Traceback (most recent call last): > File "./mkt.py", line 351, in loop_timeout > self.process(self.event.get_next()) > File "./mkt.py", line 361, in process > self.player.play(command[1]) > File "./mkt.py", line 107, in play > if self.is_playing(): > File "./mkt.py", line 78, in is_playing > info = rfd.readlines() > IOError: [Errno 4] Interrupted system call > > why? Thank you! Some signal was evidently delivered to your process, while you had a "slow" read in progress (i.e., not from disk.) The read was interrupted to deliver the signal. Look for signal handlers in your code and any library functions you call. I hope library functions don't have signal handlers, sounds like a horrible idea to me. If your code has a signal handler for SIGCHLD, try to get rid of that - the handler itself is causing your problem. OO (Object Oriented?) doesn't have anything to do with the problem, that I can think of. Donn Cave, [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list