Mercurial > octave-antonio
diff libinterp/corefcn/nproc.cc @ 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 | 10c57204fd72 |
children | 9163a6e9b096 |
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