doconfig - execute a configuration script
cc [ flag ... ] file ... -lnsl [ library ... ] # include <sac.h> int doconfig(int fildes, char *script, long rflag);
doconfig() is a Service Access Facility library function that interprets the configuration scripts contained in the files </etc/saf/pmtag/_config>, </etc/saf/_sysconfig>, and </etc/saf/pmtag/svctag>, where pmtag specifies the tag associated with the port monitor, and svctag specifies the service tag associated with a given service. See pmadm(1M) and sacadm(1M).
script is the name of the configuration script; fildes is a file descriptor that designates the stream to which stream manipulation operations are to be applied; rflag is a bitmask that indicates the mode in which script is to be interpreted. If rflag is zero, all commands in the configuration script are eligible to be interpreted. If rflag has the NOASSIGN bit set, the assign command is considered illegal and will generate an error return. If rflag has the NORUN bit set, the run and runwait commands are considered illegal and will generate error returns.
The configuration language in which script is written consists of a sequence of commands, each of which is interpreted separately. The following reserved keywords are defined: assign, push, pop, runwait, and run. The comment character is #; when a # occurs on a line, everything from that point to the end of the line is ignored. Blank lines are not significant. No line in a command script may exceed 1024 characters.
assign variable=value
push module1[, module2, module3, . . .]
pop [module]
runwait command
run command
Although they are syntactically indistinguishable, some of the commands available to run and runwait are interpreter built-in commands. Interpreter built-ins are used when it is necessary to alter the state of a process within the context of that process. The doconfig() interpreter built-in commands are similar to the shell special commands and, like these, they do not spawn another process for execution. See sh(1). The built-in commands are:
cd ulimit umask
doconfig() returns 0 if the script was interpreted successfully. If a command in the script fails, the interpretation of the script ceases at that point and a positive number is returned; this number indicates which line in the script failed. If a system error occurs, a value of -1 is returned. When a script fails, the process whose environment was being established should not be started.
See attributes(5) for descriptions of the following attributes:
|
sh(1), pmadm(1M), sacadm(1M), attributes(5)
This interface is unsafe in multithreaded applications. Unsafe interfaces should be called only from the main thread.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |