Qore Programming Language Reference Manual  0.9.4.3
ql_lib.dox.h
1 
3 namespace Qore {
5 
7 struct NetIfInfo {
9  *string address;
11  *string address_desc;
13  int family;
15  string familystr;
17  string interface;
18 };
19 }
20 
22 namespace Qore {
24 
26 struct ExceptionInfo {
28  auto arg;
30  list<hash<CallStackInfo>> callstack;
32  auto desc;
34  int endline;
36  auto err;
38  string file;
40  string lang;
42  int line;
44  hash<ExceptionInfo> next;
46  int offset;
48  string source;
50  string type;
51 };
52 }
53 
55 namespace Qore {
140 
153 nothing abort();
154 
156 
170 string basename(string path);
171 
173 
177 nothing basename();
178 
180 
196 nothing close_all_fd(*softbool strd);
197 
199 
213 string dirname(string path);
214 
216 
220 nothing dirname();
221 
223 
233 int errno();
234 
236 
246 nothing exec(string command);
247 
249 
261 nothing exit(softint rc = 0);
262 
264 
292 int fork();
293 
295 
348 list<hash<NetIfInfo>> get_netif_list();
349 
351 
373 list<hash<auto>> getaddrinfo(*string node, *softstring service, softint family = AF_UNSPEC, softint flags = 0);
374 
376 
390 int getegid();
391 
393 
407 int geteuid();
408 
410 
424 int getgid();
425 
427 
443 list<int> getgroups();
444 
446 
470 *string gethostbyaddr(string addr, softint type = AF_INET);
471 
473 
477 nothing gethostbyaddr();
478 
480 
504 *hash gethostbyaddr_long(string addr, softint type = AF_INET);
505 
507 
511 nothing gethostbyaddr_long();
512 
514 
533 *string gethostbyname(string name);
534 
536 
540 nothing gethostbyname();
541 
543 
562 *hash gethostbyname_long(string name);
563 
565 
569 nothing gethostbyname_long();
570 
572 
585 string gethostname();
586 
588 
601 int getpid();
602 
604 
621 int getppid();
622 
624 
638 int getuid();
639 
641 
662 int kill(softint pid, softint sig = SIGHUP);
663 
665 
672 nothing kill();
673 
675 
685 
687 
699 int qore_set_library_options(int opts);
700 
702 
719 int rand();
720 
722 
739 int setegid(softint gid);
740 
742 
759 int seteuid(softint uid);
760 
762 
779 int setgid(softint gid);
780 
782 
798 nothing setgroups(softlist<softint> gids);
799 
801 
814 int setsid();
815 
817 
834 int setuid(softint uid);
835 
837 
851 int sleep(softint seconds);
852 
854 
861 nothing sleep();
862 
864 
880 nothing srand(softint seed);
881 
883 
890 nothing srand();
891 
893 
906 string strerror(softint err);
907 
909 
922 string strerror();
923 
925 
945 int system(string command);
946 
948 
955 nothing system();
956 
958 
974 int usleep(softint usecs);
975 
977 
993 int usleep(date d);
994 
996 
1003 nothing usleep();
1004 
1006 }
1007 
1009 namespace Qore {
1029 
1034 }
Qore::sleep
int sleep(softint seconds)
Causes the current thread to sleep for a certain number of seconds.
Qore::QLO_DO_NOT_SEED_RNG
const QLO_DO_NOT_SEED_RNG
disable seeding the random number generator when the Qore library is initialized (init only)
Definition: ql_lib.dox.h:1027
Qore::ExceptionInfo::type
string type
exception type: "User" or "System"; see Exception Type Constants
Definition: ql_lib.dox.h:50
Qore::ExceptionInfo::next
hash< ExceptionInfo > next
chained exception info
Definition: ql_lib.dox.h:44
Qore::getaddrinfo
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...
Qore::geteuid
int geteuid()
Returns the effective user ID of the current process.
Qore::ExceptionInfo::offset
int offset
position info: line number offset for the "source" key (if known, for user code only)
Definition: ql_lib.dox.h:46
Qore::QLO_RUNTIME_OPTS
const QLO_RUNTIME_OPTS
bitmask for library options that can be set at runtime
Definition: ql_lib.dox.h:1032
Qore::type
string type(auto arg)
Returns a string giving the data type of the argument passed; see String Type Constants for the value...
Qore::QLO_DISABLE_OPENSSL_CLEANUP
const QLO_DISABLE_OPENSSL_CLEANUP
do not perform cleanup on the openssl library (= is cleaned up manually; init only)
Definition: ql_lib.dox.h:1019
Qore::ExceptionInfo::err
auto err
this key is populated with the value of the first expression of the throw statement....
Definition: ql_lib.dox.h:36
Qore::qore_get_library_options
int qore_get_library_options()
returns all Qore library options
Qore::usleep
int usleep(softint usecs)
Causes the current thread to sleep for a certain number of microseconds.
Qore::ExceptionInfo::arg
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:28
Qore::setgid
int setgid(softint gid)
Changes the process group ID according to the argument passed.
Qore::ExceptionInfo::desc
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:32
Qore::seteuid
int seteuid(softint uid)
Changes the effective process user ID according to the argument passed.
Qore::setegid
int setegid(softint gid)
Changes the process effective group ID according to the argument passed.
Qore::strerror
string strerror(softint err)
Returns the string corresponding to the error code passed (generally retrieved with errno())
Qore::getuid
int getuid()
Returns the real user ID of the current process.
Qore::getgid
int getgid()
Returns the real group ID of the current process.
Qore::errno
int errno()
Returns the error code of the last error that occurred in the current thread.
Qore::setuid
int setuid(softint uid)
Changes the process user ID according to the argument passed.
Qore::SIGHUP
const SIGHUP
SIGHUP.
Definition: ql_misc.dox.h:2290
Qore::QLO_DISABLE_OPENSSL_INIT
const QLO_DISABLE_OPENSSL_INIT
do not initialize the openssl library (= is initialized before the qore library is initialized; init ...
Definition: ql_lib.dox.h:1021
Qore::ExceptionInfo
exception information hash
Definition: ql_lib.dox.h:26
Qore::QLO_DISABLE_SIGNAL_HANDLING
const QLO_DISABLE_SIGNAL_HANDLING
disable qore signal handling entirely (init only)
Definition: ql_lib.dox.h:1023
Qore::abort
nothing abort()
Aborts the current program (this function does not return)
Qore::srand
nothing srand(softint seed)
Seeds the random number generator with the integer passed.
Qore::getpid
int getpid()
Returns the PID (process ID) of the current process.
Qore::setsid
int setsid()
Creates a new session lead by the calling process.
Qore::close_all_fd
nothing close_all_fd(*softbool strd)
closes all possible file descriptors; useful in "daemon" processes that may have inherited open file ...
Qore::fork
int fork()
Creates a copy of the current process with a new PID; returns 0 in the child process; returns the chi...
Qore::qore_set_library_options
int qore_set_library_options(int opts)
sets Qore runtime library options
Qore::NetIfInfo::familystr
string familystr
interface family type string
Definition: ql_lib.dox.h:15
Qore::QLO_DISABLE_TLS_13
const QLO_DISABLE_TLS_13
disable TLS v1.3 (may be set at runtime with qore_set_library_options())
Definition: ql_lib.dox.h:1025
Qore::NetIfInfo::family
int family
interface family type; see Network Address Family Constants for possible values
Definition: ql_lib.dox.h:13
Qore::QLO_DISABLE_GARBAGE_COLLECTION
const QLO_DISABLE_GARBAGE_COLLECTION
disable garbage collection / recursive object reference detection (init only)
Definition: ql_lib.dox.h:1017
Qore::AF_INET
const AF_INET
IPv4 address family.
Definition: QC_Socket.dox.h:2880
Qore::getegid
int getegid()
Returns the effective group ID of the current process.
Qore::hash
hash< auto > hash(object obj)
Returns a hash of an object's members.
Qore::setgroups
nothing setgroups(softlist< softint > gids)
sets the list of supplementary group IDs for the current process
Qore::NetIfInfo::address_desc
*string address_desc
interface address description (if the address is available)
Definition: ql_lib.dox.h:11
Qore::gethostbyname
*string gethostbyname(string name)
Returns the first address corresponding to the hostname passed as an argument or NOTHING if the looku...
Qore::get_netif_list
list< hash< NetIfInfo > > get_netif_list()
returns a list of network interfaces
Qore::system
int system(string command)
executes a command and returns the exit code of the process
Qore::ExceptionInfo::file
string file
position info: the parse label where exception occurred; this is normally the file name; this corresp...
Definition: ql_lib.dox.h:38
Qore::ExceptionInfo::lang
string lang
the language of the source code location; normally "Qore"
Definition: ql_lib.dox.h:40
Qore::kill
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.
Qore::getppid
int getppid()
Returns the PID (process ID) of the parent process of the current process.
Qore::rand
int rand()
Returns a random non-negative 64-bit integer number.
Qore::ExceptionInfo::source
string source
position info: an optional source string; if multiple sections of a file were parsed with different p...
Definition: ql_lib.dox.h:48
Qore::gethostbyaddr
*string gethostbyaddr(string addr, softint type=AF_INET)
Returns the official hostname corresponding to the network address passed as an argument.
Qore::NetIfInfo::address
*string address
interface address if available
Definition: ql_lib.dox.h:9
Qore::basename
string basename(string path)
Returns a string giving the last element of a file path (meant to be the filename)
Qore::date
date date(date dt)
Returns the date passed.
Qore::AF_UNSPEC
const AF_UNSPEC
unspecified address family
Definition: QC_Socket.dox.h:2888
Qore::ExceptionInfo::endline
int endline
position info: end line number
Definition: ql_lib.dox.h:34
Qore::NetIfInfo
network interface info hash
Definition: ql_lib.dox.h:7
Qore::exec
nothing exec(string command)
Replaces the current process image with another; this function does not return.
Qore::ExceptionInfo::line
int line
position info: start line number
Definition: ql_lib.dox.h:42
Qore::gethostname
string gethostname()
Returns the hostname of the system.
Qore::dirname
string dirname(string path)
Returns a string giving the path up to a file but not the filename itself.
Qore
main Qore-language namespace
Definition: Pseudo_QC_All.dox.h:3
Qore::NetIfInfo::interface
string interface
interface name
Definition: ql_lib.dox.h:17
Qore::gethostbyaddr_long
*hash gethostbyaddr_long(string addr, softint type=AF_INET)
Returns a hash representing all host and address information corresponding to the address and address...
Qore::getgroups
list< int > getgroups()
returns a list of group IDs that the user is a member of
Qore::exit
nothing exit(softint rc=0)
Exits the program with the return code passed (this function does not return)
Qore::seconds
date seconds(softint seconds)
Returns a relative date/time value in seconds based on the integer argument passed to be used in date...
Qore::ExceptionInfo::callstack
list< hash< CallStackInfo > > callstack
call stack backtrace information
Definition: ql_lib.dox.h:30
Qore::gethostbyname_long
*hash gethostbyname_long(string name)
Returns a hash representing all host and address information corresponding to the hostname passed as ...