Mercurial > octave-antonio
changeset 19145:b5c03bcc640a
nproc: Fix unwind_protect_cleanup block in %!test
* nproc.cc: Fix unwind_protect_cleanup to unset OMP_NUM_THREADS if it
wasn't set before the test was run.
author | Mike Miller <mtmiller@ieee.org> |
---|---|
date | Sun, 21 Sep 2014 16:33:08 -0400 |
parents | e99d7a2e7367 |
children | a84f0182f912 |
files | libinterp/corefcn/nproc.cc |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/nproc.cc Sun Sep 21 16:12:36 2014 -0400 +++ b/libinterp/corefcn/nproc.cc Sun Sep 21 16:33:08 2014 -0400 @@ -100,6 +100,8 @@ %! unwind_protect_cleanup %! if (! isempty (old_val)) %! setenv ("OMP_NUM_THREADS", old_val); +%! else +%! setenv ("OMP_NUM_THREADS", ""); %! endif %! end_unwind_protect