Add function in libtclenvmodules to implement `initStateUsergroups` as a
Tcl command, which provides a more efficient way to retrieve current
groups of running process, rather forking to execute `id` external
binary.
Note that if current system does not support the `getgroups` system
call, only the primary group name of current user will be returned.
Add function in libtclenvmodules to implement `initStateUsername` as a
Tcl command, which provides a more efficient way to retrieve current
username, rather forking to execute `id` external binary.
Add function in libtclenvmodules to implement getFilesInDirectory as a
command, which provides a more IO-optimized way than native Tcl commands
perform by avoiding specific additional queries to get hidden files like
.modulerc and .version. As a result 1 stat and 2 access syscalls are
saved per directory read.
Introduce Modules Tcl extension library (written in C) to extend Tcl
language in order to provide more optimized I/O commands than native Tcl
commands do.
This library first provides a 'readFile' command which performs an open,
read, close of a given modulefile to fetch its content. Compared to the
Tcl native open, read, close commands it saves 1 ioctl + 1 fcntl + N
lstat system calls per modulefile.