Qore Programming Language Reference Manual  0.9.3
ql_lib.dox.h
1 namespace Qore {
4 
6 struct NetIfInfo {
8  *string address;
10  *string address_desc;
12  int family;
14  string familystr;
16  string interface;
17 };
18 };
20 namespace Qore {
22 
24 struct ExceptionInfo {
26  auto arg;
28  list<hash<CallStackInfo>> callstack;
30  auto desc;
32  int endline;
34  auto err;
36  string file;
38  string lang;
40  int line;
42  hash<ExceptionInfo> next;
44  int offset;
46  string source;
48  string type;
49 };
50 };
51 
53 namespace Qore {
137 
139 
151 nothing abort();
152 
154 
168 string basename(string path);
169 
171 
175 nothing basename();
176 
178 
194 nothing close_all_fd(*softbool strd);
195 
197 
211 string dirname(string path);
212 
214 
218 nothing dirname();
219 
221 
231 int errno();
232 
234 
244 nothing exec(string command);
245 
247 
259 nothing exit(softint rc = 0);
260 
262 
290 int fork();
291 
293 
346 list<hash<NetIfInfo>> get_netif_list();
347 
349 
371 list<hash<auto>> getaddrinfo(*string node, *softstring service, softint family = AF_UNSPEC, softint flags = 0);
372 
374 
388 int getegid();
389 
391 
405 int geteuid();
406 
408 
422 int getgid();
423 
425 
441 list<int> getgroups();
442 
444 
468 *string gethostbyaddr(string addr, softint type = AF_INET);
469 
471 
475 nothing gethostbyaddr();
476 
478 
502 *hash gethostbyaddr_long(string addr, softint type = AF_INET);
503 
505 
509 nothing gethostbyaddr_long();
510 
512 
531 *string gethostbyname(string name);
532 
534 
538 nothing gethostbyname();
539 
541 
560 *hash gethostbyname_long(string name);
561 
563 
567 nothing gethostbyname_long();
568 
570 
583 string gethostname();
584 
586 
599 int getpid();
600 
602 
619 int getppid();
620 
622 
636 int getuid();
637 
639 
660 int kill(softint pid, softint sig = SIGHUP);
661 
663 
670 nothing kill();
671 
673 
690 int rand();
691 
693 
710 int setegid(softint gid);
711 
713 
730 int seteuid(softint uid);
731 
733 
750 int setgid(softint gid);
751 
753 
769 nothing setgroups(softlist<softint> gids);
770 
772 
785 int setsid();
786 
788 
805 int setuid(softint uid);
806 
808 
822 int sleep(softint seconds);
823 
825 
832 nothing sleep();
833 
835 
851 nothing srand(softint seed);
852 
854 
861 nothing srand();
862 
864 
877 string strerror(softint err);
878 
880 
893 string strerror();
894 
896 
916 int system(string command);
917 
919 
926 nothing system();
927 
929 
945 int usleep(softint usecs);
946 
948 
964 int usleep(date d);
965 
967 
974 nothing usleep();
975 
977 };
*string gethostbyname(string name)
Returns the first address corresponding to the hostname passed as an argument or NOTHING if the looku...
*string address
interface address if available
Definition: ql_lib.dox.h:8
int getuid()
Returns the real user ID of the current process.
date date(date dt)
Returns the date passed.
int getegid()
Returns the effective group ID of the current process.
const AF_UNSPEC
unspecified address family
Definition: QC_Socket.dox.h:2662
int rand()
Returns a random non-negative 64-bit integer number.
network interface info hash
Definition: ql_lib.dox.h:6
nothing srand(softint seed)
Seeds the random number generator with the integer passed.
nothing setgroups(softlist< softint > gids)
sets the list of supplementary group IDs for the current process
hash< ExceptionInfo > next
chained exception info
Definition: ql_lib.dox.h:42
int seteuid(softint uid)
Changes the effective process user ID according to the argument passed.
int line
position info: start line number
Definition: ql_lib.dox.h:40
int getgid()
Returns the real group ID of the current process.
string gethostname()
Returns the hostname of the system.
int geteuid()
Returns the effective user ID of the current process.
auto desc
this key is populated with the value of the second expression of the throw statement (if a list was t...
Definition: ql_lib.dox.h:30
int usleep(softint usecs)
Causes the current thread to sleep for a certain number of microseconds.
int setgid(softint gid)
Changes the process group ID according to the argument passed.
int kill(softint pid, softint sig=SIGHUP)
Sends a signal to a process, if no signal number is given, then Qore::SIGHUP is sent by default.
nothing exec(string command)
Replaces the current process image with another; this function does not return.
auto err
this key is populated with the value of the first expression of the throw statement....
Definition: ql_lib.dox.h:34
string lang
the language of the source code location; normally "Qore"
Definition: ql_lib.dox.h:38
nothing close_all_fd(*softbool strd)
closes all possible file descriptors; useful in "daemon" processes that may have inherited open file ...
int getpid()
Returns the PID (process ID) of the current process.
list< hash< NetIfInfo > > get_netif_list()
returns a list of network interfaces
string familystr
interface family type string
Definition: ql_lib.dox.h:14
int endline
position info: end line number
Definition: ql_lib.dox.h:32
string dirname(string path)
Returns a string giving the path up to a file but not the filename itself.
auto arg
this key is populated with the value of the third expression of the throw statement (if a list was th...
Definition: ql_lib.dox.h:26
*hash gethostbyaddr_long(string addr, softint type=AF_INET)
Returns a hash representing all host and address information corresponding to the address and address...
list< int > getgroups()
returns a list of group IDs that the user is a member of
nothing exit(softint rc=0)
Exits the program with the return code passed (this function does not return)
const AF_INET
IPv4 address family.
Definition: QC_Socket.dox.h:2654
int setegid(softint gid)
Changes the process effective group ID according to the argument passed.
nothing abort()
Aborts the current program (this function does not return)
string type(auto arg)
Returns a string giving the data type of the argument passed; see String Type Constants for the value...
const SIGHUP
SIGHUP.
Definition: ql_misc.dox.h:2260
*string gethostbyaddr(string addr, softint type=AF_INET)
Returns the official hostname corresponding to the network address passed as an argument.
list< hash< CallStackInfo > > callstack
call stack backtrace information
Definition: ql_lib.dox.h:28
hash< auto > hash(object obj)
Returns a hash of an object's members.
int system(string command)
executes a command and returns the exit code of the process
string strerror(softint err)
Returns the string corresponding to the error code passed (generally retrieved with errno())
int errno()
Returns the error code of the last error that occurred in the current thread.
int setuid(softint uid)
Changes the process user ID according to the argument passed.
int family
interface family type; see Network Address Family Constants for possible values
Definition: ql_lib.dox.h:12
int getppid()
Returns the PID (process ID) of the parent process of the current process.
string type
exception type: "User" or "System"; see Exception Type Constants
Definition: ql_lib.dox.h:48
list< hash< auto > > getaddrinfo(*string node, *softstring service, softint family=AF_UNSPEC, softint flags=0)
Returns a list of Address Information Hash for the given node name or string address; if no lookup ca...
*string address_desc
interface address description (if the address is available)
Definition: ql_lib.dox.h:10
int offset
position info: line number offset for the "source" key (if known, for user code only)
Definition: ql_lib.dox.h:44
string basename(string path)
Returns a string giving the last element of a file path (meant to be the filename)
int fork()
Creates a copy of the current process with a new PID; returns 0 in the child process; returns the chi...
string source
position info: an optional source string; if multiple sections of a file were parsed with different p...
Definition: ql_lib.dox.h:46
string interface
interface name
Definition: ql_lib.dox.h:16
main Qore-language namespace
Definition: Pseudo_QC_All.dox.h:2
string file
position info: the parse label where exception occurred; this is normally the file name; this corresp...
Definition: ql_lib.dox.h:36
int setsid()
Creates a new session lead by the calling process.
date seconds(softint seconds)
Returns a relative date/time value in seconds based on the integer argument passed to be used in date...
exception information hash
Definition: ql_lib.dox.h:24
*hash gethostbyname_long(string name)
Returns a hash representing all host and address information corresponding to the hostname passed as ...
int sleep(softint seconds)
Causes the current thread to sleep for a certain number of seconds.