syscp - set system-specific information

 

SYNOPSIS

<syscp $what [$arg ...]>


DESCRIPTION
The syscp function sets various system- or OS-level parameters. The $what argument determines what is affected:

  • chdir $dir or cd $dir Change the current working directory to $dir.

  • umask $mode Change the process's umask to $mode, which must be a chmod-style bitmask. These bits are ANDed (masked off) with the mode bits given during file open commands. Added in version 4.00.997400000 20010809.

  • setenv $varname $value [$overwrite]

    Sets each environment variable named by $varname to the corresponding $value. If the environment variable already exists, it will be overwritten, unless the $overwrite argument (if present) is false (i.e. the default is to overwrite). Added in version 3.01.991350000 20010531. Notes:

    • setenv changes the true current process environment, not the Vortex variable(s) of the same name that may have been initialized at start.

    • Vortex variables can be assigned on the command line for a script, so it is not necessary to set the environment to pass variables to a sub-process <EXEC> script.

    • In version 5 and later, the ENVSET option to <EXEC> can be used to set environment vars for just the sub-process being <EXEC>ed, without modifying (with potential side effects) the current process's environment.

  • unsetenv $varname

    Clears environment variable $varname.

  • processdescription $desc  

    Sets process description to $desc (a string). The given value is prefixed with "texis: " and copied to the live process command line, which is generally viewable with ps or Task Manager/Process Explorer. This lets a long-running Vortex script show its current state, task, progress, etc. in a limited but portable and easily visible way. If $desc is empty or unset, the description is cleared and the original command line restored. Setting or clearing a process description has no effect on $cmdlnargs, <vxinfo cmdlnargs>, nor <vxinfo scriptargs>. Returns empty on success, "Truncated" silently if description was set but truncated (limited by original command line length), or "Failed" (and error message reported) on error. Added in version 7.06.1522794000 20180403. See also <sysinfo maxprocessdescriptionlen> (here).


DIAGNOSTICS
syscp returns an empty string on success, otherwise a string describing the error.


EXAMPLE

<syscp chdir "/some/other/dir">


CAVEATS
The syscp function was added in version 3.01.975700000 20001201.


SEE ALSO
sysinfo, sysutil


Copyright © Thunderstone Software     Last updated: Sep 25 2019
Copyright © 2019 Thunderstone Software LLC. All rights reserved.