[issue16548] os.system won't run any command and there is no error message when memory cannot be allocated

2012-11-26 Thread R. David Murray
R. David Murray added the comment: Agree with the rejection. os.system is intended to be a minimal wrapper around the system call, as are most things in the os module, and as such mirroring the behavior of the system call (by returning -1) is less surprising than raising an exception, even

[issue16548] os.system won't run any command and there is no error message when memory cannot be allocated

2012-11-25 Thread Ramchandra Apte
Ramchandra Apte added the comment: +1 on exception -- nosy: +ramchandra.apte ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16548 ___ ___

[issue16548] os.system won't run any command and there is no error message when memory cannot be allocated

2012-11-25 Thread Mark Dickinson
Mark Dickinson added the comment: -1 on an exception. This would be a backwards-incompatible API change, so could only happen in Python 3.4. os.system is well documented, including a recommendation to use the subprocess module instead. Reclassifying as a feature request, since this isn't a

[issue16548] os.system won't run any command and there is no error message when memory cannot be allocated

2012-11-24 Thread masterid
New submission from masterid: os.system won't run any command and there is no error message when memory cannot be allocated. It looks like Python is running a command but actually nothing happens. I used subprocess.Popen instead and found out that OSError: [Errno 12] Cannot allocate memory I

[issue16548] os.system won't run any command and there is no error message when memory cannot be allocated

2012-11-24 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: If Unix system call system() fails, it will return -1. Python should convert a -1 to the appropiate exception, checking errno. In Solaris, for instance, system() is documented to fail if the max number of processes are reached, if the syscall was interrupted