# HG changeset patch # User Mike Miller # Date 1411331588 14400 # Node ID b5c03bcc640a46514636b59d4dc66184fa053602 # Parent e99d7a2e736713a7b944f85e521cceea3f8188a1 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. diff -r e99d7a2e7367 -r b5c03bcc640a libinterp/corefcn/nproc.cc --- 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