source:
trunk/src/call_command_clean.m
@
1140
Last change on this file since 1140 was 1138, checked in by , 5 months ago | |
---|---|
File size: 403 bytes |
Rev | Line | |
---|---|---|
[1136] | 1 | %'call_command_clean': call a command with LD_LIBRARY_PATH cleaned |
2 | ||
3 | function [status, result]=call_command_clean(command) | |
4 | ||
5 | paths = strsplit(getenv('LD_LIBRARY_PATH'), ':'); | |
6 | cc = regexp(paths, 'matlab/'); | |
7 | new_paths = paths(cellfun('isempty', cc)); | |
8 | clean_ld_lib_path = strjoin(new_paths, ':'); | |
9 | ||
[1138] | 10 | [status, result] = system(['OMP_NUM_THREADS=1 LD_LIBRARY_PATH=' clean_ld_lib_path ' ' command], '-echo'); |
[1136] | 11 | end |
Note: See TracBrowser
for help on using the repository browser.