function runprop = localSingleTask(runprop)
%

% Copyright 2004-2019 The MathWorks, Inc.

% Get a function handle to set status messages for lsf on this particular
% task - this will set the default message handler to be lsfSet
dctSchedulerMessage(2, 'In parallel.internal.decode.localSingleTask');

storageConstructor = parallel.internal.cluster.getParallelServerEnv('PARALLEL_SERVER_STORAGE_CONSTRUCTOR');
storageLocation    = parallel.internal.urldecode( parallel.internal.cluster.getParallelServerEnv('PARALLEL_SERVER_STORAGE_LOCATION') );
jobLocation        = parallel.internal.cluster.getParallelServerEnv('PARALLEL_SERVER_JOB_LOCATION');
taskLocation       = parallel.internal.cluster.getParallelServerEnv('PARALLEL_SERVER_TASK_LOCATION');
    
set(runprop, ...
    'LocalSchedulerName', 'parallel.cluster.Local', ...
    'FallbackSchedulerName', 'parallel.cluster.TaskRunner', ...
    'StorageConstructor', storageConstructor, ...
    'StorageLocation', storageLocation, ...
    'JobLocation', jobLocation, ....
    'TaskLocation', taskLocation);

% Ensure that on unix we mask SIGINT and SIGSTOP as the shell 
% will send these signals to all members of the main MATLAB
% process group. Thus we will replace the handlers with functions
% that do nothing so we are unaffected by these signals
parallel.internal.apishared.LocalUtils.installLocalSignalHandler();

end
