Diez is correct, the C program is writting to stdout, you are reading from stdout. Default bahavior in most modern Unix like systems is to buffer std out. I stumbled on this a long time ago, so I am trying to remember the details.
What I think is happening here, you call the child process, it does it's thing and puts thing into stdout. How long does the child process run typically? What also is the actual behavior? How is it wrong, exactly? Are you getting the full output from the C program? Part of it? I still suspect a buffering problem of some sort, but I am not clear on what is going wrong. -- http://mail.python.org/mailman/listinfo/python-list