Taking our off-tracker discussion into account, my understanding is that we want to let the
driver ignore external limits. The following pull request should do just that and I adjusted the
issue title accordingly:
https://bitbucket.org/jendrikseipp/downward/pull-requests/107/
If the internal time limit surpasses the external hard limit, it is a failure and the driver
aborts.
Working on this I uncovered a subtle bug: the driver captures all stderr output when calling the
translator, including the preexec function that is used to set the resource limits. If that
function encounters an error (like trying to raise a hard resource limit), we print the error to
stderr and exit the driver immediately. Since the stderr output is captured, however, it is
never shown to the user.
The pull request addresses this in the last commit
(https://bitbucket.org/jendrikseipp/downward/commits/426a105737dcd56ac8243a2eba06c33d7eb6ba5d).
If we encounter an error in a child process, we use os._exit() to exit only the child process,
not the whole interpreter. This requires passing around is_subprocess Booleansin quite a few
places. If you have a more elegant solution, please let me know.
|