Qore Programming Language Reference Manual  0.8.13.5
 All Classes Namespaces Functions Variables Groups Pages
ql_lib.dox.h
1 namespace Qore {
4 
6 struct ExceptionInfo {
8  auto arg;
10  list<hash<CallStackInfo>> callstack;
12  auto desc;
14  int endline;
16  auto err;
18  string file;
20  int line;
22  hash<ExceptionInfo> next;
24  int offset;
26  string source;
28  string type;
29 };
30 };
31 
33 namespace Qore {
117 
119 
131 nothing abort();
132 
134 
148 string basename(string path);
149 
151 
155 nothing basename();
156 
158 
174 nothing close_all_fd(*softbool strd);
175 
177 
191 string dirname(string path);
192 
194 
198 nothing dirname();
199 
201 
211 int errno();
212 
214 
224 nothing exec(string command);
225 
227 
239 nothing exit(softint rc = 0);
240 
242 
270 int fork();
271 
273 
295 list getaddrinfo(*string node, *softstring service, softint family = AF_UNSPEC, softint flags = 0);
296 
298 
312 int getegid();
313 
315 
329 int geteuid();
330 
332 
346 int getgid();
347 
349 
365 list getgroups();
366 
368 
392 *string gethostbyaddr(string addr, softint type = AF_INET);
393 
395 
399 nothing gethostbyaddr();
400 
402 
426 *hash gethostbyaddr_long(string addr, softint type = AF_INET);
427 
429 
433 nothing gethostbyaddr_long();
434 
436 
455 *string gethostbyname(string name);
456 
458 
462 nothing gethostbyname();
463 
465 
484 *hash gethostbyname_long(string name);
485 
487 
491 nothing gethostbyname_long();
492 
494 
507 string gethostname();
508 
510 
523 int getpid();
524 
526 
543 int getppid();
544 
546 
560 int getuid();
561 
563 
584 int kill(softint pid, softint sig = SIGHUP);
585 
587 
594 nothing kill();
595 
597 
613 int rand();
614 
616 
633 int setegid(softint gid);
634 
636 
653 int seteuid(softint uid);
654 
656 
673 int setgid(softint gid);
674 
676 
692 nothing setgroups(softlist gids);
693 
695 
708 int setsid();
709 
711 
728 int setuid(softint uid);
729 
731 
745 int sleep(softint seconds);
746 
748 
755 nothing sleep();
756 
758 
774 nothing srand(softint seed);
775 
777 
784 nothing srand();
785 
787 
800 string strerror(softint err);
801 
803 
816 string strerror();
817 
819 
839 int system(string command);
840 
842 
849 nothing system();
850 
852 
868 int usleep(softint usecs);
869 
871 
887 int usleep(date d);
888 
890 
897 nothing usleep();
898 
900 };
*string gethostbyname(string name)
Returns the first address corresponding to the hostname passed as an argument or NOTHING if the looku...
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:2619
int rand()
Returns a random 64-bit integer number.
nothing srand(softint seed)
Seeds the random number generator with the integer passed.
hash< ExceptionInfo > next
chained exception info
Definition: ql_lib.dox.h:22
list getgroups()
returns a list of group IDs that the user is a member of
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:20
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:12
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...
list 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...
list list(...)
Returns an untyped list of the arguments passed at the top level.
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. For system exceptions, this is a string giving the exception code.
Definition: ql_lib.dox.h:16
nothing close_all_fd(*softbool strd)
closes all possible file descriptors; useful in &quot;daemon&quot; processes that may have inherited open file ...
int getpid()
Returns the PID (process ID) of the current process.
int endline
position info: end line number
Definition: ql_lib.dox.h:14
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:8
*hash gethostbyaddr_long(string addr, softint type=AF_INET)
Returns a hash representing all host and address information corresponding to the address and address...
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:2611
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:2122
*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:10
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 getppid()
Returns the PID (process ID) of the parent process of the current process.
string type
exception type: &quot;User&quot; or &quot;System&quot;; see Exception Type Constants
Definition: ql_lib.dox.h:28
int offset
position info: line number offset for the &quot;source&quot; key (if known, for user code only) ...
Definition: ql_lib.dox.h:24
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:26
string file
position info: the parse label where exception occurred; this is normally the file name; this corresp...
Definition: ql_lib.dox.h:18
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...
hash hash(object obj)
Returns a hash of an object&#39;s members.
exception information hash
Definition: ql_lib.dox.h:6
*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.
nothing setgroups(softlist gids)
sets the list of supplementary group IDs for the current process