Indeed, I did the experiment again with while 1: y = os.system("sleep 1") print y and it ALWAYS returns 0, with control-c or without.
>From past experience, I am pretty sure that in other cases I have been getting non-zero return values. So I would hesitate to believe that what you observe is due to something within your application package. Maybe as Don Cave suggests, one should try spawnv although it seems to be more complicated to use it with "sleep 1". -- http://mail.python.org/mailman/listinfo/python-list