5 ms·
Seems Python handles this correctly (by raising an exception): >>> resource.setrlimit(resource.RLIMIT_NPROC, (0, 0)) >>> os.fork() Traceback (most
by ionelm 12y ago
Seems Python handles this correctly (by raising an exception):
>>> resource.setrlimit(resource.RLIMIT_NPROC, (0, 0))
>>> os.fork()
Traceback (most recent call last):
File "<ipython-input-7-348c6e46312a>", line 1, in <module>
os.fork()
OSError: [Errno 11] Resource temporarily unavailable
- illumen 12y agoThere are plenty of little nice things like this in python that save you. So if you're porting python code to other platforms... be very careful!