\hypertarget{group__library__functions}{}\doxysection{Library Functions}
\label{group__library__functions}\index{Library Functions@{Library Functions}}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
nothing \mbox{\hyperlink{group__library__functions_ga4a51c4086a24e58fdeafe467d8188fbf}{Qore\+::abort}} ()
\begin{DoxyCompactList}\small\item\em Aborts the current program (this function does not return) \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__library__functions_ga2552ac9c7f40c474e3b311b6178d7909}{Qore\+::basename}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path)
\begin{DoxyCompactList}\small\item\em Returns a string giving the last element of a file path (meant to be the filename) \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__library__functions_ga0d6ab2c29ebf1ce62d34530d4a5be37c}{Qore\+::basename}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__library__functions_gab6595c1e20c2e84bea8a17544ec35a7f}{Qore\+::close\+\_\+all\+\_\+fd}} (\+\_\+\+\_\+7\+\_\+ softbool strd)
\begin{DoxyCompactList}\small\item\em closes all possible file descriptors; useful in \char`\"{}daemon\char`\"{} processes that may have inherited open file descriptors \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__library__functions_gaf9b9660d3eaaa087df1681f905936622}{Qore\+::dirname}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path)
\begin{DoxyCompactList}\small\item\em Returns a string giving the path up to a file but not the filename itself. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__library__functions_ga4b79aceed8fba8255b64024aaa0b193c}{Qore\+::dirname}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{Qore\+::errno}} ()
\begin{DoxyCompactList}\small\item\em Returns the error code of the last error that occurred in the current thread. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__library__functions_ga62b13320abd1919d456e2cb84390b0b2}{Qore\+::exec}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} command)
\begin{DoxyCompactList}\small\item\em Replaces the current process image with another; this function does not return. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__library__functions_ga3ec32747f455642fd9ce503094a5cc85}{Qore\+::exit}} (softint rc=0)
\begin{DoxyCompactList}\small\item\em Exits the program with the return code passed (this function does not return) \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__library__functions_ga38309c0ab1c849afc031dd8547b1ac65}{Qore\+::fork}} ()
\begin{DoxyCompactList}\small\item\em Creates a copy of the current process with a new PID; returns 0 in the child process; returns the child\textquotesingle{}s PID in the parent process. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{list}}$<$ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ \mbox{\hyperlink{struct_qore_1_1_net_if_info}{Net\+If\+Info}} $>$ $>$ \mbox{\hyperlink{group__library__functions_gae0203299fb2f3aaf805af92ada527afc}{Qore\+::get\+\_\+netif\+\_\+list}} ()
\begin{DoxyCompactList}\small\item\em returns a list of network interfaces \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{list}}$<$ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ auto $>$ $>$ \mbox{\hyperlink{group__library__functions_ga30a65bf8f992dd435b05f92c3fa734e5}{Qore\+::getaddrinfo}} (\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} node, \+\_\+\+\_\+7\+\_\+ softstring service, softint family=\mbox{\hyperlink{group__network__address__family__constants_gac4f81abe9d374562b41117c51950fb80}{AF\+\_\+\+UNSPEC}}, softint flags=0)
\begin{DoxyCompactList}\small\item\em Returns a list of \mbox{\hyperlink{group__library__functions_address_information_hash}{Address Information Hash}} for the given node name or string address; if no lookup can be performed then an exception is thrown. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__library__functions_ga4195fddb23078a08e36088c5b9da1c63}{Qore\+::getegid}} ()
\begin{DoxyCompactList}\small\item\em Returns the effective group ID of the current process. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__library__functions_gae504e6dff1aa04fab954b492830df193}{Qore\+::geteuid}} ()
\begin{DoxyCompactList}\small\item\em Returns the effective user ID of the current process. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__library__functions_gae45b3134a21e8efc465c469bbe6b58d7}{Qore\+::getgid}} ()
\begin{DoxyCompactList}\small\item\em Returns the real group ID of the current process. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{list}}$<$ \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} $>$ \mbox{\hyperlink{group__library__functions_gab6402f7bc808e017708f4e1e35e2ca2d}{Qore\+::getgroups}} ()
\begin{DoxyCompactList}\small\item\em returns a list of group IDs that the user is a member of \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__library__functions_gabf75d8247386c90c83583f6cd6909e1b}{Qore\+::gethostbyaddr}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} addr, softint \mbox{\hyperlink{group__type__conversion__functions_ga181e32c9bc8075431e88bb9bb56285a9}{type}}=\mbox{\hyperlink{group__network__address__family__constants_gad33bf2a0a393d1100099acfb6ca644e2}{AF\+\_\+\+INET}})
\begin{DoxyCompactList}\small\item\em Returns the official hostname corresponding to the network address passed as an argument. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__library__functions_ga7a7e2b5705964d0180b42dc8707e6090}{Qore\+::gethostbyaddr}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ auto $>$ \mbox{\hyperlink{group__library__functions_gaf9e9807ccdf0ae0b01cf9564bc4bcbfa}{Qore\+::gethostbyaddr\+\_\+long}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} addr, softint \mbox{\hyperlink{group__type__conversion__functions_ga181e32c9bc8075431e88bb9bb56285a9}{type}}=\mbox{\hyperlink{group__network__address__family__constants_gad33bf2a0a393d1100099acfb6ca644e2}{AF\+\_\+\+INET}})
\begin{DoxyCompactList}\small\item\em Returns \mbox{\hyperlink{group__library__functions_host_information_hash}{a hash}} representing all host and address information corresponding to the address and address type passed as arguments. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__library__functions_gab2e7951ad5d39a0e735702d2ceaa3e90}{Qore\+::gethostbyaddr\+\_\+long}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__library__functions_gaa4ca4c902bdebd8b368fb2ae00bf76b2}{Qore\+::gethostbyname}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} name)
\begin{DoxyCompactList}\small\item\em Returns the first address corresponding to the hostname passed as an argument or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if the lookup fails. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__library__functions_gab94736fbd3118f66eaa40c9ceb7d06ae}{Qore\+::gethostbyname}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ auto $>$ \mbox{\hyperlink{group__library__functions_gad9f7ea12bc74653d6c6d045f4fcef86d}{Qore\+::gethostbyname\+\_\+long}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} name)
\begin{DoxyCompactList}\small\item\em Returns \mbox{\hyperlink{group__library__functions_host_information_hash}{a hash}} representing all host and address information corresponding to the hostname passed as an argument. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__library__functions_gace5c385a0af1e9b227618b94b2ccd2cf}{Qore\+::gethostbyname\+\_\+long}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__library__functions_ga8bd938f03b1a6edb02b2a9970f5c8dda}{Qore\+::gethostname}} ()
\begin{DoxyCompactList}\small\item\em Returns the hostname of the system. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__library__functions_ga5eb17bd4d23498ef42ba908d328421ce}{Qore\+::getpid}} ()
\begin{DoxyCompactList}\small\item\em Returns the PID (process ID) of the current process. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__library__functions_ga28a69151eb051b67a5190a9570d35603}{Qore\+::getppid}} ()
\begin{DoxyCompactList}\small\item\em Returns the PID (process ID) of the parent process of the current process. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__library__functions_gaa7cce69c66cbc6f183fa71931cdfc466}{Qore\+::getuid}} ()
\begin{DoxyCompactList}\small\item\em Returns the real user ID of the current process. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__library__functions_ga0052a260c867683b040d0944cd85ef32}{Qore\+::kill}} (softint pid, softint sig=\mbox{\hyperlink{group__signal__constants_ga1a9d023101a217b83525ea6e2f7581cf}{SIGHUP}})
\begin{DoxyCompactList}\small\item\em Sends a signal to a process, if no signal number is given, then \mbox{\hyperlink{group__signal__constants_ga1a9d023101a217b83525ea6e2f7581cf}{Qore\+::\+SIGHUP}} is sent by default. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__library__functions_gadf633e4d1be4ca6a24b58e5964b14070}{Qore\+::kill}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__library__functions_gac7494d18fbf6edfad9bec02c31455e2b}{Qore\+::qore\+\_\+get\+\_\+library\+\_\+options}} ()
\begin{DoxyCompactList}\small\item\em returns all Qore library options \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__library__functions_ga9a72550004b28a5c05b45afc196a037c}{Qore\+::qore\+\_\+set\+\_\+library\+\_\+options}} (\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} opts)
\begin{DoxyCompactList}\small\item\em sets Qore runtime library options \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__library__functions_ga6ed36f08f41864dfe007504e8b4ff5c3}{Qore\+::rand}} ()
\begin{DoxyCompactList}\small\item\em Returns a random non-\/negative 64-\/bit integer number. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__library__functions_ga978d06ec48b315287cd514601645e21b}{Qore\+::setegid}} (softint gid)
\begin{DoxyCompactList}\small\item\em Changes the process effective group ID according to the argument passed. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__library__functions_ga6bc0ecedb69f16a65b91bbb15d281446}{Qore\+::seteuid}} (softint uid)
\begin{DoxyCompactList}\small\item\em Changes the effective process user ID according to the argument passed. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__library__functions_ga643d15328846a7d64139c34a29efe53b}{Qore\+::setgid}} (softint gid)
\begin{DoxyCompactList}\small\item\em Changes the process group ID according to the argument passed. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__library__functions_gaac8ec21015bc2dc8970cad98a1c6586c}{Qore\+::setgroups}} (softlist$<$ softint $>$ gids)
\begin{DoxyCompactList}\small\item\em sets the list of supplementary group IDs for the current process \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__library__functions_ga6274ab755dee8ae955d48271d9a44676}{Qore\+::setsid}} ()
\begin{DoxyCompactList}\small\item\em Creates a new session lead by the calling process. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__library__functions_gad740d1b241a725df36965aa2bfb50231}{Qore\+::setuid}} (softint uid)
\begin{DoxyCompactList}\small\item\em Changes the process user ID according to the argument passed. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__library__functions_gaad550dd966f91790528ec81150d5cf71}{Qore\+::sleep}} (softint \mbox{\hyperlink{group__date__and__time__functions_ga19566ff46f3818f4554c73ba145fd8e1}{seconds}})
\begin{DoxyCompactList}\small\item\em Causes the current thread to sleep for a certain number of seconds. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__library__functions_gab828a9624ba2903b88ae4d52bf6094d9}{Qore\+::sleep}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__library__functions_gaeb017e3b5ea8ff39e270e844f280e32b}{Qore\+::srand}} (softint seed)
\begin{DoxyCompactList}\small\item\em Seeds the random number generator with the integer passed. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__library__functions_gae6dd9a1ccae25a097d61cf0575161075}{Qore\+::srand}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__library__functions_ga13d9bb498eef9caffe641130bd8a1c73}{Qore\+::strerror}} (softint err)
\begin{DoxyCompactList}\small\item\em Returns the string corresponding to the error code passed (generally retrieved with \mbox{\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}}) \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__library__functions_gadfdbab96958d3623d431a7ab292d7e27}{Qore\+::strerror}} ()
\begin{DoxyCompactList}\small\item\em Returns the string corresponding to the last error that occurred in the current thread. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__library__functions_gab480d27a192337309e6497158df8e54c}{Qore\+::system}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} command)
\begin{DoxyCompactList}\small\item\em executes a command and returns the exit code of the process \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__library__functions_ga45e8c0b1cd4f673e5f72ce758bc84378}{Qore\+::system}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__library__functions_ga9bfa54e2c02b92b2a01f3cde2472ce6a}{Qore\+::usleep}} (softint usecs)
\begin{DoxyCompactList}\small\item\em Causes the current thread to sleep for a certain number of microseconds. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{group__library__functions_ga16b8b55b41fe579ce56a3b781b69a3f9}{Qore\+::usleep}} (\mbox{\hyperlink{group__date__and__time__functions_gaa80ee453b6a5653ac685d7e290c74e3f}{date}} d)
\begin{DoxyCompactList}\small\item\em Causes the current thread to sleep for a certain number of microseconds. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{group__library__functions_ga3c406430b305f4ee204cb1dd2638d93c}{Qore\+::usleep}} ()
\begin{DoxyCompactList}\small\item\em This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Library functions\hypertarget{group__library__functions_host_information_hash}{}\doxysubsection{Host Information Hash}\label{group__library__functions_host_information_hash}
 \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{3}{|X[-1]}|}
\hline
{\bfseries{Key}} &{\bfseries{\mbox{\hyperlink{namespace_qore_1_1_type}{Type}}}} &{\bfseries{Description}}  \\\cline{1-3}
{\ttfamily name}  &\mbox{\hyperlink{data_type_declarations_string_type}{string}} &The official fully-\/qualified name of the host  \\\cline{1-3}
{\ttfamily aliases}  &\mbox{\hyperlink{data_type_declarations_list_type}{list}} of \mbox{\hyperlink{data_type_declarations_string_type}{string}} &Any hostname aliases for the host  \\\cline{1-3}
{\ttfamily typename}  &\mbox{\hyperlink{data_type_declarations_string_type}{string}} &The type of network address (either {\ttfamily \char`\"{}ipv4\char`\"{}} or {\ttfamily \char`\"{}ipv6\char`\"{}})  \\\cline{1-3}
{\ttfamily type}  &\mbox{\hyperlink{data_type_declarations_int_type}{int}} &One of the \mbox{\hyperlink{group__network__address__family__constants}{Network Address Family Constants}} (either \mbox{\hyperlink{group__network__address__family__constants_gad33bf2a0a393d1100099acfb6ca644e2}{Qore\+::\+AF\+\_\+\+INET}} or \mbox{\hyperlink{group__network__address__family__constants_ga4b71df64cd838d8f5c0c1974d3011dab}{Qore\+::\+AF\+\_\+\+INET6}}) corresponding to the type of network addresses given  \\\cline{1-3}
{\ttfamily len}  &\mbox{\hyperlink{data_type_declarations_int_type}{int}} &The length of the addresses in bytes when represented in binary form  \\\cline{1-3}
{\ttfamily addresses}  &\mbox{\hyperlink{data_type_declarations_list_type}{list}} of \mbox{\hyperlink{data_type_declarations_string_type}{string}} &All addresses corresponding to the host; the list should have at least 1 element  \\\cline{1-3}
\end{longtabu}
\hypertarget{group__library__functions_address_information_hash}{}\doxysubsection{Address Information Hash}\label{group__library__functions_address_information_hash}
 \tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{3}{|X[-1]}|}
\hline
{\bfseries{Key}} &{\bfseries{\mbox{\hyperlink{namespace_qore_1_1_type}{Type}}}} &{\bfseries{Description}}  \\\cline{1-3}
{\ttfamily address}  &\mbox{\hyperlink{data_type_declarations_string_type}{string}} &A valid address of the host, for example\+: {\ttfamily \char`\"{}\+::1\char`\"{}}.  \\\cline{1-3}
{\ttfamily address\+\_\+desc}  &\mbox{\hyperlink{data_type_declarations_string_type}{string}} &A descriptive string of the address containing the address family, for example\+: {\ttfamily \char`\"{}ipv6\mbox{[}\+::1\mbox{]}\char`\"{}}   \\\cline{1-3}
{\ttfamily family}  &\mbox{\hyperlink{data_type_declarations_int_type}{int}} &The network address family; see Network Address Family Constants.  \\\cline{1-3}
{\ttfamily familystr}  &\mbox{\hyperlink{data_type_declarations_string_type}{string}} &A descriptive string for the network address family, for example\+: {\ttfamily \char`\"{}ipv6\char`\"{}}.  \\\cline{1-3}
{\ttfamily addrlen}  &\mbox{\hyperlink{data_type_declarations_int_type}{int}} &The length of the internal network address data structure (not normally needed in Qore but provided anyway)  \\\cline{1-3}
\mbox{[}{\ttfamily port}\mbox{]} &\mbox{\hyperlink{data_type_declarations_int_type}{int}} &The port number corresponding to the service (if applicable)  \\\cline{1-3}
\end{longtabu}


\doxysubsection{Function Documentation}
\mbox{\Hypertarget{group__library__functions_ga4a51c4086a24e58fdeafe467d8188fbf}\label{group__library__functions_ga4a51c4086a24e58fdeafe467d8188fbf}} 
\index{Library Functions@{Library Functions}!abort@{abort}}
\index{abort@{abort}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{abort()}{abort()}}
{\footnotesize\ttfamily nothing Qore\+::abort (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Aborts the current program (this function does not return) 

This function causes the current process to terminate abnormally; a core dump or crash report may be generated if enabled

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+PROCESS\+\_\+\+CONTROL}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{abort();}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__library__functions_ga3ec32747f455642fd9ce503094a5cc85}{exit()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__library__functions_ga0d6ab2c29ebf1ce62d34530d4a5be37c}\label{group__library__functions_ga0d6ab2c29ebf1ce62d34530d4a5be37c}} 
\index{Library Functions@{Library Functions}!basename@{basename}}
\index{basename@{basename}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{basename()}{basename()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily nothing Qore\+::basename (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{RUNTIME\+\_\+\+NOOP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__library__functions_ga2552ac9c7f40c474e3b311b6178d7909}\label{group__library__functions_ga2552ac9c7f40c474e3b311b6178d7909}} 
\index{Library Functions@{Library Functions}!basename@{basename}}
\index{basename@{basename}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{basename()}{basename()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::basename (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path }\end{DoxyParamCaption})}



Returns a string giving the last element of a file path (meant to be the filename) 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em path} & the path to process\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a string giving the last element of the given file path (meant to be the filename)
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{string fn = basename(\textcolor{stringliteral}{"{}/usr/local/bin/file\_name"{}});}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__library__functions_ga4b79aceed8fba8255b64024aaa0b193c}{dirname()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__library__functions_gab6595c1e20c2e84bea8a17544ec35a7f}\label{group__library__functions_gab6595c1e20c2e84bea8a17544ec35a7f}} 
\index{Library Functions@{Library Functions}!close\_all\_fd@{close\_all\_fd}}
\index{close\_all\_fd@{close\_all\_fd}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{close\_all\_fd()}{close\_all\_fd()}}
{\footnotesize\ttfamily nothing Qore\+::close\+\_\+all\+\_\+fd (\begin{DoxyParamCaption}\item[{\+\_\+\+\_\+7\+\_\+ softbool}]{strd }\end{DoxyParamCaption})}



closes all possible file descriptors; useful in \char`\"{}daemon\char`\"{} processes that may have inherited open file descriptors 

\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_ga3bc61668e0fc9fd0a3fd172419e94804}{Qore\+::\+Option\+::\+HAVE\+\_\+\+CLOSE\+\_\+\+ALL\+\_\+\+FD}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+PROCESS\+\_\+\+CONTROL}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em strd} & if \mbox{\hyperlink{basic_data_types_True}{True}} then also stdin, stdout, and stderr are closed, otherwise fds \texorpdfstring{$>$}{>} 2 are closed\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{close\_all\_fd();}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
if there are file descriptors open by \mbox{\hyperlink{namespace_qore}{Qore}} when this function is called, this function will also close those file descriptors; normally this function should only be used when starting a new process after a \mbox{\hyperlink{group__library__functions_ga38309c0ab1c849afc031dd8547b1ac65}{fork()}} and \mbox{\hyperlink{group__library__functions_ga62b13320abd1919d456e2cb84390b0b2}{exec()}} to close any inherited descriptors, for example 
\end{DoxyNote}
\mbox{\Hypertarget{group__library__functions_ga4b79aceed8fba8255b64024aaa0b193c}\label{group__library__functions_ga4b79aceed8fba8255b64024aaa0b193c}} 
\index{Library Functions@{Library Functions}!dirname@{dirname}}
\index{dirname@{dirname}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{dirname()}{dirname()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily nothing Qore\+::dirname (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{RUNTIME\+\_\+\+NOOP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__library__functions_gaf9b9660d3eaaa087df1681f905936622}\label{group__library__functions_gaf9b9660d3eaaa087df1681f905936622}} 
\index{Library Functions@{Library Functions}!dirname@{dirname}}
\index{dirname@{dirname}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{dirname()}{dirname()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::dirname (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path }\end{DoxyParamCaption})}



Returns a string giving the path up to a file but not the filename itself. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em path} & the path to process\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a string giving the path up to a file but not the filename itself; if no directory separator characters can be found in the path, {\ttfamily \char`\"{}.\char`\"{}} is returned (meaning the current directory)
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{string dir = dirname(\textcolor{stringliteral}{"{}/usr/local/bin/file\_name"{}});}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__library__functions_ga0d6ab2c29ebf1ce62d34530d4a5be37c}{basename()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}\label{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}} 
\index{Library Functions@{Library Functions}!errno@{errno}}
\index{errno@{errno}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{errno()}{errno()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::errno (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the error code of the last error that occurred in the current thread. 

\begin{DoxyReturn}{Returns}
the error code of the last error that occurred in the current thread (see \mbox{\hyperlink{group__error__constants}{Error Constants}} for possible error code values)
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{if} (unlink(path))}
\DoxyCodeLine{    printf(\textcolor{stringliteral}{"{}\%s: \%s\(\backslash\)n"{}}, path, strerror(errno()));}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__library__functions_gadfdbab96958d3623d431a7ab292d7e27}{strerror()}} for a function that gives the \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} description for the error \mbox{\hyperlink{group__type__conversion__functions_gaf6000d64e3fe99ce81b9faaf44b2de4e}{number}} returned by this function 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__library__functions_ga62b13320abd1919d456e2cb84390b0b2}\label{group__library__functions_ga62b13320abd1919d456e2cb84390b0b2}} 
\index{Library Functions@{Library Functions}!exec@{exec}}
\index{exec@{exec}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{exec()}{exec()}}
{\footnotesize\ttfamily nothing Qore\+::exec (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{command }\end{DoxyParamCaption})}



Replaces the current process image with another; this function does not return. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_gaab2d8faa88f066837e100152187e6368}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+EXTERNAL\+\_\+\+PROCESS}}, \mbox{\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+PROCESS\+\_\+\+CONTROL}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em command} & the executable to execute and any command-\/line arguments; the command is executed internally by a call to execvp() (3)\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{exec(\textcolor{stringliteral}{"{}/usr/bin/xterm -\/bg black -\/fg white -\/sb -\/sl 2000"{}});}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__library__functions_ga3ec32747f455642fd9ce503094a5cc85}\label{group__library__functions_ga3ec32747f455642fd9ce503094a5cc85}} 
\index{Library Functions@{Library Functions}!exit@{exit}}
\index{exit@{exit}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{exit()}{exit()}}
{\footnotesize\ttfamily nothing Qore\+::exit (\begin{DoxyParamCaption}\item[{softint}]{rc = {\ttfamily 0} }\end{DoxyParamCaption})}



Exits the program with the return code passed (this function does not return) 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+PROCESS\+\_\+\+CONTROL}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em rc} & the return code for the process (0 = no error; success)\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{exit(0);}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__library__functions_ga4a51c4086a24e58fdeafe467d8188fbf}{abort()}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__library__functions_ga38309c0ab1c849afc031dd8547b1ac65}\label{group__library__functions_ga38309c0ab1c849afc031dd8547b1ac65}} 
\index{Library Functions@{Library Functions}!fork@{fork}}
\index{fork@{fork}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{fork()}{fork()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::fork (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Creates a copy of the current process with a new PID; returns 0 in the child process; returns the child\textquotesingle{}s PID in the parent process. 

This function will throw an {\ttfamily ILLEGAL-\/\+FORK} exception if more than one thread is running

\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_ga841db19d8ad8f5d04eaf8980aed008a4}{Qore\+::\+Option\+::\+HAVE\+\_\+\+FORK}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+PROCESS\+\_\+\+CONTROL}}
\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
0 in the child process; returns the child\textquotesingle{}s PID in the parent process; if an error occurs, then -\/1 is returned, in this case no child process was started and the error number can be retrieved with the \mbox{\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}} function
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{int pid;}
\DoxyCodeLine{\textcolor{keywordflow}{if} (pid = fork())}
\DoxyCodeLine{    printf(\textcolor{stringliteral}{"{}child has PID \%d\(\backslash\)n"{}}, pid);}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em ILLEGAL-\/\+FORK} & Cannot fork if more than one thread is running\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}

\begin{DoxyItemize}
\item after a \mbox{\hyperlink{group__library__functions_ga38309c0ab1c849afc031dd8547b1ac65}{fork()}}, the only safe call is \mbox{\hyperlink{group__library__functions_ga62b13320abd1919d456e2cb84390b0b2}{exec()}}, many system calls are not async-\/signal safe, including pthread\+\_\+create() which is used to start new threads.
\item the Qore process will crash if unsafe operations are called after a \mbox{\hyperlink{group__library__functions_ga38309c0ab1c849afc031dd8547b1ac65}{fork()}}
\item the signal-\/handling thread cannot be reliably started on many platforms (ex\+: Free\+BSD) after a \mbox{\hyperlink{group__library__functions_ga38309c0ab1c849afc031dd8547b1ac65}{fork()}}, therefore signal handling is disabled in the child process after a \mbox{\hyperlink{group__library__functions_ga38309c0ab1c849afc031dd8547b1ac65}{fork()}}
\item on Darwin (OS/X) threading primitives are unusable in the child process after a \mbox{\hyperlink{group__library__functions_ga38309c0ab1c849afc031dd8547b1ac65}{fork()}} 
\end{DoxyItemize}
\end{DoxyNote}
\mbox{\Hypertarget{group__library__functions_gae0203299fb2f3aaf805af92ada527afc}\label{group__library__functions_gae0203299fb2f3aaf805af92ada527afc}} 
\index{Library Functions@{Library Functions}!get\_netif\_list@{get\_netif\_list}}
\index{get\_netif\_list@{get\_netif\_list}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{get\_netif\_list()}{get\_netif\_list()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{list}}$<$ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ \mbox{\hyperlink{struct_qore_1_1_net_if_info}{Net\+If\+Info}} $>$ $>$ Qore\+::get\+\_\+netif\+\_\+list (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



returns a list of network interfaces 

\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_ga39b9cdc4df2f0b13b08ce661b3f31d6b}{Qore\+::\+Option\+::\+HAVE\+\_\+\+GET\+\_\+\+NETIF\+\_\+\+LIST}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga213aab826b55076c29ffeecebbaea237}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+EXTERNAL\+\_\+\+INFO}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{list<hash<NetIfInfo>> l = get\_netif\_list();}
\DoxyCodeLine{}
\DoxyCodeLine{results \textcolor{keywordflow}{for} example into:}
\DoxyCodeLine{list: (8 elements)}
\DoxyCodeLine{  [0]=hash: (5 members)}
\DoxyCodeLine{    interface : \textcolor{stringliteral}{"{}lo"{}}}
\DoxyCodeLine{    address : \textcolor{stringliteral}{"{}00:00:00:00:00:00"{}}}
\DoxyCodeLine{    address\_desc : \textcolor{stringliteral}{"{}mac<00:00:00:00:00:00>"{}}}
\DoxyCodeLine{    family : 17}
\DoxyCodeLine{    familystr : \textcolor{stringliteral}{"{}mac"{}}}
\DoxyCodeLine{  [1]=hash: (5 members)}
\DoxyCodeLine{    interface : \textcolor{stringliteral}{"{}eth0"{}}}
\DoxyCodeLine{    address : \textcolor{stringliteral}{"{}44:8a:5b:ba:13:50"{}}}
\DoxyCodeLine{    address\_desc : \textcolor{stringliteral}{"{}mac<44:8a:5b:ba:13:50>"{}}}
\DoxyCodeLine{    family : 17}
\DoxyCodeLine{    familystr : \textcolor{stringliteral}{"{}mac"{}}}
\DoxyCodeLine{  [2]=hash: (5 members)}
\DoxyCodeLine{    interface : \textcolor{stringliteral}{"{}lo"{}}}
\DoxyCodeLine{    address : \textcolor{stringliteral}{"{}127.0.0.1"{}}}
\DoxyCodeLine{    address\_desc : \textcolor{stringliteral}{"{}ipv4(127.0.0.1)"{}}}
\DoxyCodeLine{    family : 2}
\DoxyCodeLine{    familystr : \textcolor{stringliteral}{"{}ipv4"{}}}
\DoxyCodeLine{  [3]=hash: (5 members)}
\DoxyCodeLine{    interface : \textcolor{stringliteral}{"{}eth0"{}}}
\DoxyCodeLine{    address : \textcolor{stringliteral}{"{}192.168.20.4"{}}}
\DoxyCodeLine{    address\_desc : \textcolor{stringliteral}{"{}ipv4(192.168.20.4)"{}}}
\DoxyCodeLine{    family : 2}
\DoxyCodeLine{    familystr : \textcolor{stringliteral}{"{}ipv4"{}}}
\DoxyCodeLine{  [4]=hash: (5 members)}
\DoxyCodeLine{    interface : \textcolor{stringliteral}{"{}lo"{}}}
\DoxyCodeLine{    address : \textcolor{stringliteral}{"{}::1"{}}}
\DoxyCodeLine{    address\_desc : \textcolor{stringliteral}{"{}ipv6[::1]"{}}}
\DoxyCodeLine{    family : 10}
\DoxyCodeLine{    familystr : \textcolor{stringliteral}{"{}ipv6"{}}}
\DoxyCodeLine{  [5]=hash: (5 members)}
\DoxyCodeLine{    interface : \textcolor{stringliteral}{"{}eth0"{}}}
\DoxyCodeLine{    address : \textcolor{stringliteral}{"{}fe80::213:3bff:fe0f:d5e1"{}}}
\DoxyCodeLine{    address\_desc : \textcolor{stringliteral}{"{}ipv6[fe80::213:3bff:fe0f:d5e1]"{}}}
\DoxyCodeLine{    family : 10}
\DoxyCodeLine{    familystr : \textcolor{stringliteral}{"{}ipv6"{}}}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
returns a list of network interfaces available on the local machine 
\end{DoxyReturn}
\mbox{\Hypertarget{group__library__functions_ga30a65bf8f992dd435b05f92c3fa734e5}\label{group__library__functions_ga30a65bf8f992dd435b05f92c3fa734e5}} 
\index{Library Functions@{Library Functions}!getaddrinfo@{getaddrinfo}}
\index{getaddrinfo@{getaddrinfo}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{getaddrinfo()}{getaddrinfo()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{list}}$<$ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ auto $>$ $>$ Qore\+::getaddrinfo (\begin{DoxyParamCaption}\item[{\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{node,  }\item[{\+\_\+\+\_\+7\+\_\+ softstring}]{service,  }\item[{softint}]{family = {\ttfamily \mbox{\hyperlink{group__network__address__family__constants_gac4f81abe9d374562b41117c51950fb80}{AF\+\_\+\+UNSPEC}}},  }\item[{softint}]{flags = {\ttfamily 0} }\end{DoxyParamCaption})}



Returns a list of \mbox{\hyperlink{group__library__functions_address_information_hash}{Address Information Hash}} for the given node name or string address; if no lookup can be performed then an exception is thrown. 

Either node or service may be \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} but not both or a {\ttfamily QOREADDRINFO-\/\+GETINFO-\/\+ERROR} exception will be thrown

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga213aab826b55076c29ffeecebbaea237}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+EXTERNAL\+\_\+\+INFO}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{RET\+\_\+\+VALUE\+\_\+\+ONLY}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em node} & The host name or node name to look up \\
\hline
{\em service} & The service name to look up to a port number \\
\hline
{\em family} & The \mbox{\hyperlink{group__network__address__family__constants}{address family}} for the lookup, must be one of \mbox{\hyperlink{group__network__address__family__constants_gad33bf2a0a393d1100099acfb6ca644e2}{Qore\+::\+AF\+\_\+\+INET}}, \mbox{\hyperlink{group__network__address__family__constants_ga4b71df64cd838d8f5c0c1974d3011dab}{Qore\+::\+AF\+\_\+\+INET6}}, or \mbox{\hyperlink{group__network__address__family__constants_gac4f81abe9d374562b41117c51950fb80}{Qore\+::\+AF\+\_\+\+UNSPEC}}, meaning to return all possible addresses \\
\hline
{\em flags} & see \mbox{\hyperlink{group__network__address__information__constants}{Network Address Information Constants}} for possible values to be combined with \mbox{\hyperlink{operators_bitwise_or_operator}{binary or}}\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a list of \mbox{\hyperlink{group__library__functions_address_information_hash}{Address Information Hash}} for the given node name or string address; if no lookup can be performed then an exception is thrown
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{list<hash<auto>> l = getaddrinfo(\textcolor{stringliteral}{"{}localhost"{}});}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em QOREADDRINFO-\/\+GETINFO-\/\+ERROR} & nodename nor servname provided, or not known \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{group__library__functions_ga4195fddb23078a08e36088c5b9da1c63}\label{group__library__functions_ga4195fddb23078a08e36088c5b9da1c63}} 
\index{Library Functions@{Library Functions}!getegid@{getegid}}
\index{getegid@{getegid}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{getegid()}{getegid()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::getegid (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the effective group ID of the current process. 

\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_gaef9b69b7df60ff7aa74035d772add3c6}{Qore\+::\+Option\+::\+HAVE\+\_\+\+UNIX\+\_\+\+USERMGT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga213aab826b55076c29ffeecebbaea237}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+EXTERNAL\+\_\+\+INFO}}
\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
the effective group ID of the current process
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{int egid = getegid();}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__library__functions_gae504e6dff1aa04fab954b492830df193}\label{group__library__functions_gae504e6dff1aa04fab954b492830df193}} 
\index{Library Functions@{Library Functions}!geteuid@{geteuid}}
\index{geteuid@{geteuid}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{geteuid()}{geteuid()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::geteuid (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the effective user ID of the current process. 

\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_gaef9b69b7df60ff7aa74035d772add3c6}{Qore\+::\+Option\+::\+HAVE\+\_\+\+UNIX\+\_\+\+USERMGT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga213aab826b55076c29ffeecebbaea237}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+EXTERNAL\+\_\+\+INFO}}
\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
the effective user ID of the current process
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{int euid = geteuid();}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__library__functions_gae45b3134a21e8efc465c469bbe6b58d7}\label{group__library__functions_gae45b3134a21e8efc465c469bbe6b58d7}} 
\index{Library Functions@{Library Functions}!getgid@{getgid}}
\index{getgid@{getgid}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{getgid()}{getgid()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::getgid (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the real group ID of the current process. 

\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_gaef9b69b7df60ff7aa74035d772add3c6}{Qore\+::\+Option\+::\+HAVE\+\_\+\+UNIX\+\_\+\+USERMGT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga213aab826b55076c29ffeecebbaea237}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+EXTERNAL\+\_\+\+INFO}}
\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
the real group ID of the current process
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{int gid = getgid();}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__library__functions_gab6402f7bc808e017708f4e1e35e2ca2d}\label{group__library__functions_gab6402f7bc808e017708f4e1e35e2ca2d}} 
\index{Library Functions@{Library Functions}!getgroups@{getgroups}}
\index{getgroups@{getgroups}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{getgroups()}{getgroups()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{list}}$<$ \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} $>$ Qore\+::getgroups (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



returns a list of group IDs that the user is a member of 

\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_gaef9b69b7df60ff7aa74035d772add3c6}{Qore\+::\+Option\+::\+HAVE\+\_\+\+UNIX\+\_\+\+USERMGT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga213aab826b55076c29ffeecebbaea237}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+EXTERNAL\+\_\+\+INFO}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{list<int> l = getgroups();}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
a list of group IDs that the user is a member of
\end{DoxyReturn}
\begin{DoxySince}{Since}
Qore 0.\+8.\+11.\+1 
\end{DoxySince}
\mbox{\Hypertarget{group__library__functions_ga7a7e2b5705964d0180b42dc8707e6090}\label{group__library__functions_ga7a7e2b5705964d0180b42dc8707e6090}} 
\index{Library Functions@{Library Functions}!gethostbyaddr@{gethostbyaddr}}
\index{gethostbyaddr@{gethostbyaddr}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{gethostbyaddr()}{gethostbyaddr()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily nothing Qore\+::gethostbyaddr (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{RUNTIME\+\_\+\+NOOP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__library__functions_gabf75d8247386c90c83583f6cd6909e1b}\label{group__library__functions_gabf75d8247386c90c83583f6cd6909e1b}} 
\index{Library Functions@{Library Functions}!gethostbyaddr@{gethostbyaddr}}
\index{gethostbyaddr@{gethostbyaddr}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{gethostbyaddr()}{gethostbyaddr()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::gethostbyaddr (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{addr,  }\item[{softint}]{type = {\ttfamily \mbox{\hyperlink{group__network__address__family__constants_gad33bf2a0a393d1100099acfb6ca644e2}{AF\+\_\+\+INET}}} }\end{DoxyParamCaption})}



Returns the official hostname corresponding to the network address passed as an argument. 

If the address family is invalid or the address string is not a valid address for the given family a {\ttfamily GETHOSTBYADDR-\/\+ERROR} exception will be thrown.

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga213aab826b55076c29ffeecebbaea237}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+EXTERNAL\+\_\+\+INFO}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em addr} & the address to look up \\
\hline
{\em type} & the network address family; see \mbox{\hyperlink{group__network__address__family__constants}{Network Address Family Constants}} for valid values\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the official hostname corresponding to the network addressed passed as an argument
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{*string hostname = gethostbyaddr(\textcolor{stringliteral}{"{}192.168.0.33"{}});}
\DoxyCodeLine{\textcolor{keywordflow}{if} (!exists hostname)}
\DoxyCodeLine{    printf(\textcolor{stringliteral}{"{}address lookup on 192.168.0.33 failed\(\backslash\)n"{}}, host);}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em GETHOSTBYADDR-\/\+ERROR} & invalid address for the given family or invalid address family\\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__library__functions_gab2e7951ad5d39a0e735702d2ceaa3e90}{gethostbyaddr\+\_\+long()}} for a version of this function that returns all host information, including all hostname aliases and all addresses 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__library__functions_gab2e7951ad5d39a0e735702d2ceaa3e90}\label{group__library__functions_gab2e7951ad5d39a0e735702d2ceaa3e90}} 
\index{Library Functions@{Library Functions}!gethostbyaddr\_long@{gethostbyaddr\_long}}
\index{gethostbyaddr\_long@{gethostbyaddr\_long}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{gethostbyaddr\_long()}{gethostbyaddr\_long()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily nothing Qore\+::gethostbyaddr\+\_\+long (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{RUNTIME\+\_\+\+NOOP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__library__functions_gaf9e9807ccdf0ae0b01cf9564bc4bcbfa}\label{group__library__functions_gaf9e9807ccdf0ae0b01cf9564bc4bcbfa}} 
\index{Library Functions@{Library Functions}!gethostbyaddr\_long@{gethostbyaddr\_long}}
\index{gethostbyaddr\_long@{gethostbyaddr\_long}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{gethostbyaddr\_long()}{gethostbyaddr\_long()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ auto $>$ Qore\+::gethostbyaddr\+\_\+long (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{addr,  }\item[{softint}]{type = {\ttfamily \mbox{\hyperlink{group__network__address__family__constants_gad33bf2a0a393d1100099acfb6ca644e2}{AF\+\_\+\+INET}}} }\end{DoxyParamCaption})}



Returns \mbox{\hyperlink{group__library__functions_host_information_hash}{a hash}} representing all host and address information corresponding to the address and address type passed as arguments. 

If the address family is invalid or the address string is not a valid address for the given family a {\ttfamily GETHOSTBYADDR-\/\+ERROR} exception will be thrown.

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga213aab826b55076c29ffeecebbaea237}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+EXTERNAL\+\_\+\+INFO}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em addr} & the address to look up \\
\hline
{\em type} & the network address family; see \mbox{\hyperlink{group__network__address__family__constants}{Network Address Family Constants}} for valid values\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__library__functions_host_information_hash}{a hash}} representing all host and address information corresponding to the address and address type passed as arguments
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{*hash<auto> ah = gethostbyaddr\_long(\textcolor{stringliteral}{"{}192.168.0.33"{}});}
\DoxyCodeLine{\textcolor{keywordflow}{if} (!ah)}
\DoxyCodeLine{    printf(\textcolor{stringliteral}{"{}address lookup on 192.168.0.33 failed\(\backslash\)n"{}}, host);}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em GETHOSTBYADDR-\/\+ERROR} & invalid address for the given family or invalid address family\\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__library__functions_ga7a7e2b5705964d0180b42dc8707e6090}{gethostbyaddr()}} for a simpler version of this function that returns just a single hostname for the address 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__library__functions_gab94736fbd3118f66eaa40c9ceb7d06ae}\label{group__library__functions_gab94736fbd3118f66eaa40c9ceb7d06ae}} 
\index{Library Functions@{Library Functions}!gethostbyname@{gethostbyname}}
\index{gethostbyname@{gethostbyname}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{gethostbyname()}{gethostbyname()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily nothing Qore\+::gethostbyname (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{RUNTIME\+\_\+\+NOOP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__library__functions_gaa4ca4c902bdebd8b368fb2ae00bf76b2}\label{group__library__functions_gaa4ca4c902bdebd8b368fb2ae00bf76b2}} 
\index{Library Functions@{Library Functions}!gethostbyname@{gethostbyname}}
\index{gethostbyname@{gethostbyname}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{gethostbyname()}{gethostbyname()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::gethostbyname (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{name }\end{DoxyParamCaption})}



Returns the first address corresponding to the hostname passed as an argument or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if the lookup fails. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga213aab826b55076c29ffeecebbaea237}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+EXTERNAL\+\_\+\+INFO}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em name} & the name to look up\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the first address corresponding to the hostname passed as an argument or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if the lookup fails
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{*string addr = gethostbyname(host);}
\DoxyCodeLine{\textcolor{keywordflow}{if} (!exists host)}
\DoxyCodeLine{    printf(\textcolor{stringliteral}{"{}address lookup on \%y failed; hostname unknown\(\backslash\)n"{}}, host);}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__library__functions_gace5c385a0af1e9b227618b94b2ccd2cf}{gethostbyname\+\_\+long()}} for a version of this function that returns all host information, including all hostname aliases and all addresses 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__library__functions_gace5c385a0af1e9b227618b94b2ccd2cf}\label{group__library__functions_gace5c385a0af1e9b227618b94b2ccd2cf}} 
\index{Library Functions@{Library Functions}!gethostbyname\_long@{gethostbyname\_long}}
\index{gethostbyname\_long@{gethostbyname\_long}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{gethostbyname\_long()}{gethostbyname\_long()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily nothing Qore\+::gethostbyname\+\_\+long (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{RUNTIME\+\_\+\+NOOP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__library__functions_gad9f7ea12bc74653d6c6d045f4fcef86d}\label{group__library__functions_gad9f7ea12bc74653d6c6d045f4fcef86d}} 
\index{Library Functions@{Library Functions}!gethostbyname\_long@{gethostbyname\_long}}
\index{gethostbyname\_long@{gethostbyname\_long}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{gethostbyname\_long()}{gethostbyname\_long()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ auto $>$ Qore\+::gethostbyname\+\_\+long (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{name }\end{DoxyParamCaption})}



Returns \mbox{\hyperlink{group__library__functions_host_information_hash}{a hash}} representing all host and address information corresponding to the hostname passed as an argument. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga213aab826b55076c29ffeecebbaea237}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+EXTERNAL\+\_\+\+INFO}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em name} & the name to look up\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{group__library__functions_host_information_hash}{a hash}} representing all host and address information corresponding to the hostname passed as an argument
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{*hash<auto> ah = gethostbyname\_long(host);}
\DoxyCodeLine{\textcolor{keywordflow}{if} (!ah)}
\DoxyCodeLine{    printf(\textcolor{stringliteral}{"{}address lookup on \%y failed; hostname unknown\(\backslash\)n"{}}, host);}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__library__functions_gab94736fbd3118f66eaa40c9ceb7d06ae}{gethostbyname()}} for a version of this function that returns just the first network address corresponding to the hostname 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__library__functions_ga8bd938f03b1a6edb02b2a9970f5c8dda}\label{group__library__functions_ga8bd938f03b1a6edb02b2a9970f5c8dda}} 
\index{Library Functions@{Library Functions}!gethostname@{gethostname}}
\index{gethostname@{gethostname}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{gethostname()}{gethostname()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::gethostname (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the hostname of the system. 

\begin{DoxyReturn}{Returns}
the hostname of the system
\end{DoxyReturn}
\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga213aab826b55076c29ffeecebbaea237}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+EXTERNAL\+\_\+\+INFO}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{string host = gethostname();}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__library__functions_ga5eb17bd4d23498ef42ba908d328421ce}\label{group__library__functions_ga5eb17bd4d23498ef42ba908d328421ce}} 
\index{Library Functions@{Library Functions}!getpid@{getpid}}
\index{getpid@{getpid}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{getpid()}{getpid()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::getpid (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the PID (process ID) of the current process. 

\begin{DoxyReturn}{Returns}
the PID (process ID) of the current process
\end{DoxyReturn}
\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga213aab826b55076c29ffeecebbaea237}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+EXTERNAL\+\_\+\+INFO}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{RET\+\_\+\+VALUE\+\_\+\+ONLY}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{int pid = getpid();}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__library__functions_ga28a69151eb051b67a5190a9570d35603}\label{group__library__functions_ga28a69151eb051b67a5190a9570d35603}} 
\index{Library Functions@{Library Functions}!getppid@{getppid}}
\index{getppid@{getppid}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{getppid()}{getppid()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::getppid (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the PID (process ID) of the parent process of the current process. 

\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_ga6005570874832f8305631c49cbd54fa3}{Qore\+::\+Option\+::\+HAVE\+\_\+\+GETPPID}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga213aab826b55076c29ffeecebbaea237}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+EXTERNAL\+\_\+\+INFO}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{RET\+\_\+\+VALUE\+\_\+\+ONLY}}
\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
the PID (process ID) of the parent process of the current process
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{int ppid = HAVE\_GETPPID ? getppid() : -\/1;}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__library__functions_gaa7cce69c66cbc6f183fa71931cdfc466}\label{group__library__functions_gaa7cce69c66cbc6f183fa71931cdfc466}} 
\index{Library Functions@{Library Functions}!getuid@{getuid}}
\index{getuid@{getuid}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{getuid()}{getuid()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::getuid (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the real user ID of the current process. 

\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_gaef9b69b7df60ff7aa74035d772add3c6}{Qore\+::\+Option\+::\+HAVE\+\_\+\+UNIX\+\_\+\+USERMGT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga213aab826b55076c29ffeecebbaea237}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+EXTERNAL\+\_\+\+INFO}}
\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
the real user ID of the current process
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{int uid = getuid();}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__library__functions_gadf633e4d1be4ca6a24b58e5964b14070}\label{group__library__functions_gadf633e4d1be4ca6a24b58e5964b14070}} 
\index{Library Functions@{Library Functions}!kill@{kill}}
\index{kill@{kill}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{kill()}{kill()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily nothing Qore\+::kill (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_gaab2d8faa88f066837e100152187e6368}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+EXTERNAL\+\_\+\+PROCESS}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{RUNTIME\+\_\+\+NOOP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__library__functions_ga0052a260c867683b040d0944cd85ef32}\label{group__library__functions_ga0052a260c867683b040d0944cd85ef32}} 
\index{Library Functions@{Library Functions}!kill@{kill}}
\index{kill@{kill}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{kill()}{kill()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::kill (\begin{DoxyParamCaption}\item[{softint}]{pid,  }\item[{softint}]{sig = {\ttfamily \mbox{\hyperlink{group__signal__constants_ga1a9d023101a217b83525ea6e2f7581cf}{SIGHUP}}} }\end{DoxyParamCaption})}



Sends a signal to a process, if no signal number is given, then \mbox{\hyperlink{group__signal__constants_ga1a9d023101a217b83525ea6e2f7581cf}{Qore\+::\+SIGHUP}} is sent by default. 

\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_ga905db647155bcf54168df7fc7e6b96b6}{Qore\+::\+Option\+::\+HAVE\+\_\+\+KILL}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_gaab2d8faa88f066837e100152187e6368}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+EXTERNAL\+\_\+\+PROCESS}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em pid} & the pid argument can have the following interpretations\+:
\begin{DoxyItemize}
\item {\ttfamily \texorpdfstring{$>$}{>} 0}\+: the signal is sent to the process ID given
\item {\ttfamily 0}\+: the signal is sent to all processes whose group ID is equal to the process group ID of the sender, and for which the process has permission
\item {\ttfamily -\/1}\+: if the user has super-\/user privileges, the signal is sent to all processes excluding system processes and the process sending the signal. If the user is not the super user, the signal is sent to all processes with the same uid as the user, excluding the process sending the signal. No error is returned if any process could be signaled. 
\end{DoxyItemize}\\
\hline
{\em sig} & the \mbox{\hyperlink{group__signal__constants}{signal number}} to send to the process or processes\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 means success (no error), or -\/1 meaning an error occurred; in this case check \mbox{\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}} for the error
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{if} (kill(pid, SIGTERM))}
\DoxyCodeLine{    printf(\textcolor{stringliteral}{"{}error sending signal to pid \%d: \%s\(\backslash\)n"{}}, pid, strerror());}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__library__functions_gac7494d18fbf6edfad9bec02c31455e2b}\label{group__library__functions_gac7494d18fbf6edfad9bec02c31455e2b}} 
\index{Library Functions@{Library Functions}!qore\_get\_library\_options@{qore\_get\_library\_options}}
\index{qore\_get\_library\_options@{qore\_get\_library\_options}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{qore\_get\_library\_options()}{qore\_get\_library\_options()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::qore\+\_\+get\+\_\+library\+\_\+options (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



returns all Qore library options 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+PROCESS\+\_\+\+CONTROL}}
\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
all Qore library options; see \mbox{\hyperlink{group__library__option__constants}{Qore Library Option Constants}} for more information
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__library__functions_ga9a72550004b28a5c05b45afc196a037c}{qore\+\_\+set\+\_\+library\+\_\+options()}}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+9.\+3.\+1 
\end{DoxySince}
\mbox{\Hypertarget{group__library__functions_ga9a72550004b28a5c05b45afc196a037c}\label{group__library__functions_ga9a72550004b28a5c05b45afc196a037c}} 
\index{Library Functions@{Library Functions}!qore\_set\_library\_options@{qore\_set\_library\_options}}
\index{qore\_set\_library\_options@{qore\_set\_library\_options}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{qore\_set\_library\_options()}{qore\_set\_library\_options()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::qore\+\_\+set\+\_\+library\+\_\+options (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}}]{opts }\end{DoxyParamCaption})}



sets Qore runtime library options 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+PROCESS\+\_\+\+CONTROL}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em opts} & the runtime options to set, binary-\/anded with \mbox{\hyperlink{group__library__option__constants_ga5515e5a1a7ae8cab55024767f0d0cd94}{Qore\+::\+QLO\+\_\+\+RUNTIME\+\_\+\+OPTS}}; see \mbox{\hyperlink{group__library__option__constants}{Qore Library Option Constants}} and \mbox{\hyperlink{group__library__option__constants_ga5515e5a1a7ae8cab55024767f0d0cd94}{QLO\+\_\+\+RUNTIME\+\_\+\+OPTS}} for more information\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the options used
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__library__functions_gac7494d18fbf6edfad9bec02c31455e2b}{qore\+\_\+get\+\_\+library\+\_\+options()}}
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+9.\+3.\+1 
\end{DoxySince}
\mbox{\Hypertarget{group__library__functions_ga6ed36f08f41864dfe007504e8b4ff5c3}\label{group__library__functions_ga6ed36f08f41864dfe007504e8b4ff5c3}} 
\index{Library Functions@{Library Functions}!rand@{rand}}
\index{rand@{rand}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{rand()}{rand()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::rand (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns a random non-\/negative 64-\/bit integer number. 

This function uses the C library function {\ttfamily random()} to generate the number if available on the current platform, otherwise uses {\ttfamily rand}().

\begin{DoxyReturn}{Returns}
a random non-\/negative 64-\/bit integer number
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{int num = rand();}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__library__functions_gae6dd9a1ccae25a097d61cf0575161075}{srand()}} for a function to seed the random \mbox{\hyperlink{group__type__conversion__functions_gaf6000d64e3fe99ce81b9faaf44b2de4e}{number}} generator
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+13 the random number generator is seeded randomly when the Qore library is initialized 
\end{DoxySince}
\mbox{\Hypertarget{group__library__functions_ga978d06ec48b315287cd514601645e21b}\label{group__library__functions_ga978d06ec48b315287cd514601645e21b}} 
\index{Library Functions@{Library Functions}!setegid@{setegid}}
\index{setegid@{setegid}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{setegid()}{setegid()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::setegid (\begin{DoxyParamCaption}\item[{softint}]{gid }\end{DoxyParamCaption})}



Changes the process effective group ID according to the argument passed. 

\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_gaef9b69b7df60ff7aa74035d772add3c6}{Qore\+::\+Option\+::\+HAVE\+\_\+\+UNIX\+\_\+\+USERMGT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+PROCESS\+\_\+\+CONTROL}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em gid} & the group ID to set\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if no error occurred; -\/1 if an error occurred, in which case \mbox{\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}} and/or \mbox{\hyperlink{group__library__functions_gadfdbab96958d3623d431a7ab292d7e27}{strerror()}} can be used to retrieve the error
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{if} (setegid(gid))}
\DoxyCodeLine{    printf(\textcolor{stringliteral}{"{}setegid \%d: \%s\(\backslash\)n"{}}, gid, strerror());}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__library__functions_ga6bc0ecedb69f16a65b91bbb15d281446}\label{group__library__functions_ga6bc0ecedb69f16a65b91bbb15d281446}} 
\index{Library Functions@{Library Functions}!seteuid@{seteuid}}
\index{seteuid@{seteuid}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{seteuid()}{seteuid()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::seteuid (\begin{DoxyParamCaption}\item[{softint}]{uid }\end{DoxyParamCaption})}



Changes the effective process user ID according to the argument passed. 

\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_ga5fe2ab14ea36c83e7d032a79bd404622}{Qore\+::\+Option\+::\+HAVE\+\_\+\+SETEUID}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+PROCESS\+\_\+\+CONTROL}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em uid} & the user ID to set\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if no error occurred; -\/1 if an error occurred, in which case \mbox{\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}} and/or \mbox{\hyperlink{group__library__functions_gadfdbab96958d3623d431a7ab292d7e27}{strerror()}} can be used to retrieve the error
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{if} (seteuid(uid))}
\DoxyCodeLine{    printf(\textcolor{stringliteral}{"{}seteuid \%d: \%s\(\backslash\)n"{}}, uid, strerror());}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__library__functions_ga643d15328846a7d64139c34a29efe53b}\label{group__library__functions_ga643d15328846a7d64139c34a29efe53b}} 
\index{Library Functions@{Library Functions}!setgid@{setgid}}
\index{setgid@{setgid}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{setgid()}{setgid()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::setgid (\begin{DoxyParamCaption}\item[{softint}]{gid }\end{DoxyParamCaption})}



Changes the process group ID according to the argument passed. 

\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_gaef9b69b7df60ff7aa74035d772add3c6}{Qore\+::\+Option\+::\+HAVE\+\_\+\+UNIX\+\_\+\+USERMGT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+PROCESS\+\_\+\+CONTROL}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em gid} & the group ID to set\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if no error occurred; -\/1 if an error occurred, in which case \mbox{\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}} and/or \mbox{\hyperlink{group__library__functions_gadfdbab96958d3623d431a7ab292d7e27}{strerror()}} can be used to retrieve the error
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{if} (setgid(gid))}
\DoxyCodeLine{    printf(\textcolor{stringliteral}{"{}setgid \%d: \%s\(\backslash\)n"{}}, gid, strerror());}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__library__functions_gaac8ec21015bc2dc8970cad98a1c6586c}\label{group__library__functions_gaac8ec21015bc2dc8970cad98a1c6586c}} 
\index{Library Functions@{Library Functions}!setgroups@{setgroups}}
\index{setgroups@{setgroups}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{setgroups()}{setgroups()}}
{\footnotesize\ttfamily nothing Qore\+::setgroups (\begin{DoxyParamCaption}\item[{softlist$<$ softint $>$}]{gids }\end{DoxyParamCaption})}



sets the list of supplementary group IDs for the current process 

\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_gaef9b69b7df60ff7aa74035d772add3c6}{Qore\+::\+Option\+::\+HAVE\+\_\+\+UNIX\+\_\+\+USERMGT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+PROCESS\+\_\+\+CONTROL}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{setgroups(l);}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em gids} & a list of supplementary group IDs for the current process\\
\hline
\end{DoxyParams}
\begin{DoxySince}{Since}
Qore 0.\+8.\+11.\+1 
\end{DoxySince}
\mbox{\Hypertarget{group__library__functions_ga6274ab755dee8ae955d48271d9a44676}\label{group__library__functions_ga6274ab755dee8ae955d48271d9a44676}} 
\index{Library Functions@{Library Functions}!setsid@{setsid}}
\index{setsid@{setsid}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{setsid()}{setsid()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::setsid (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Creates a new session lead by the calling process. 

The calling process is the session leader of the new session, is the process group leader of a new process group and has no controlling terminal. The calling process is the only process in either the session or the process group.

\begin{DoxyReturn}{Returns}
Upon successful completion, the \mbox{\hyperlink{group__library__functions_ga6274ab755dee8ae955d48271d9a44676}{setsid()}} function returns the value of the process group ID of the new process group, which is the same as the process ID of the calling process; if an error occurs, \mbox{\hyperlink{group__library__functions_ga6274ab755dee8ae955d48271d9a44676}{setsid()}} returns -\/1 and \mbox{\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}} and/or \mbox{\hyperlink{group__library__functions_gadfdbab96958d3623d431a7ab292d7e27}{strerror()}} can be used to check the error.
\end{DoxyReturn}
\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+PROCESS\+\_\+\+CONTROL}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{if} (setsid() == -\/1)}
\DoxyCodeLine{    printf(\textcolor{stringliteral}{"{}setsid(): \%s\(\backslash\)n"{}}, strerror());}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__library__functions_gad740d1b241a725df36965aa2bfb50231}\label{group__library__functions_gad740d1b241a725df36965aa2bfb50231}} 
\index{Library Functions@{Library Functions}!setuid@{setuid}}
\index{setuid@{setuid}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{setuid()}{setuid()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::setuid (\begin{DoxyParamCaption}\item[{softint}]{uid }\end{DoxyParamCaption})}



Changes the process user ID according to the argument passed. 

\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_gaef9b69b7df60ff7aa74035d772add3c6}{Qore\+::\+Option\+::\+HAVE\+\_\+\+UNIX\+\_\+\+USERMGT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+PROCESS\+\_\+\+CONTROL}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em uid} & the user ID to set\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if no error occurred; -\/1 if an error occurred, in which case \mbox{\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}} and/or \mbox{\hyperlink{group__library__functions_gadfdbab96958d3623d431a7ab292d7e27}{strerror()}} can be used to retrieve the error
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{if} (setuid(uid))}
\DoxyCodeLine{    printf(\textcolor{stringliteral}{"{}setuid \%d: \%s\(\backslash\)n"{}}, uid, strerror());}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__library__functions_gab828a9624ba2903b88ae4d52bf6094d9}\label{group__library__functions_gab828a9624ba2903b88ae4d52bf6094d9}} 
\index{Library Functions@{Library Functions}!sleep@{sleep}}
\index{sleep@{sleep}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{sleep()}{sleep()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily nothing Qore\+::sleep (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+PROCESS\+\_\+\+CONTROL}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{RUNTIME\+\_\+\+NOOP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__library__functions_gaad550dd966f91790528ec81150d5cf71}\label{group__library__functions_gaad550dd966f91790528ec81150d5cf71}} 
\index{Library Functions@{Library Functions}!sleep@{sleep}}
\index{sleep@{sleep}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{sleep()}{sleep()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::sleep (\begin{DoxyParamCaption}\item[{softint}]{seconds }\end{DoxyParamCaption})}



Causes the current thread to sleep for a certain number of seconds. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+PROCESS\+\_\+\+CONTROL}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em seconds} & The amount of time in seconds to sleep; integer arguments are interpreted literally as a number of seconds to sleep, however a \mbox{\hyperlink{basic_data_types_relative_dates}{relative date/time value}} can be given instead of an integer to make the source more readable (ex\+: {\ttfamily 5s}), however as this function only supports a resolution of 1 second, milliseconds and microseconds are ignored if passed in a \mbox{\hyperlink{basic_data_types_relative_dates}{relative date/time value}}\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
should always return 0 for success
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{sleep(10s);}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__library__functions_ga3c406430b305f4ee204cb1dd2638d93c}{usleep()}} for a similar function supporting microsecond resolution 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__library__functions_gae6dd9a1ccae25a097d61cf0575161075}\label{group__library__functions_gae6dd9a1ccae25a097d61cf0575161075}} 
\index{Library Functions@{Library Functions}!srand@{srand}}
\index{srand@{srand}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{srand()}{srand()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily nothing Qore\+::srand (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+PROCESS\+\_\+\+CONTROL}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{RUNTIME\+\_\+\+NOOP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__library__functions_gaeb017e3b5ea8ff39e270e844f280e32b}\label{group__library__functions_gaeb017e3b5ea8ff39e270e844f280e32b}} 
\index{Library Functions@{Library Functions}!srand@{srand}}
\index{srand@{srand}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{srand()}{srand()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily nothing Qore\+::srand (\begin{DoxyParamCaption}\item[{softint}]{seed }\end{DoxyParamCaption})}



Seeds the random number generator with the integer passed. 

This function uses the C library function srandom() if available on the current platform, otherwise uses srand()

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+PROCESS\+\_\+\+CONTROL}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em seed} & the seed for the random number generator (only the least-\/significant 32-\/bits are used)\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{srand(now());}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__library__functions_ga6ed36f08f41864dfe007504e8b4ff5c3}{rand()}} for a function that returns a random \mbox{\hyperlink{group__type__conversion__functions_gaf6000d64e3fe99ce81b9faaf44b2de4e}{number}} related to the seed given here
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
Qore 0.\+8.\+13 the random number generator is seeded randomly when the Qore library is initialized 
\end{DoxySince}
\mbox{\Hypertarget{group__library__functions_gadfdbab96958d3623d431a7ab292d7e27}\label{group__library__functions_gadfdbab96958d3623d431a7ab292d7e27}} 
\index{Library Functions@{Library Functions}!strerror@{strerror}}
\index{strerror@{strerror}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{strerror()}{strerror()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::strerror (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the string corresponding to the last error that occurred in the current thread. 

\begin{DoxyReturn}{Returns}
the string corresponding to the last error that occurred in the current thread
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{if} (unlink(path))}
\DoxyCodeLine{    printf(\textcolor{stringliteral}{"{}\%s: \%s\(\backslash\)n"{}}, path, strerror());}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySince}{Since}
Qore 0.\+8.\+4 this variant of the function automatically uses the last error value for the current thread 
\end{DoxySince}
\mbox{\Hypertarget{group__library__functions_ga13d9bb498eef9caffe641130bd8a1c73}\label{group__library__functions_ga13d9bb498eef9caffe641130bd8a1c73}} 
\index{Library Functions@{Library Functions}!strerror@{strerror}}
\index{strerror@{strerror}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{strerror()}{strerror()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::strerror (\begin{DoxyParamCaption}\item[{softint}]{err }\end{DoxyParamCaption})}



Returns the string corresponding to the error code passed (generally retrieved with \mbox{\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}}) 

\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em err} & the error code to retrieve the description for (generally provided by \mbox{\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}})\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the string corresponding to the error code passed; if the error code is unknown, then a string like {\ttfamily \char`\"{}\+Unknown error\+: -\/1\char`\"{}} is returned
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{if} (unlink(path))}
\DoxyCodeLine{    printf(\textcolor{stringliteral}{"{}\%s: \%s\(\backslash\)n"{}}, path, strerror(errno()));}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__library__functions_ga45e8c0b1cd4f673e5f72ce758bc84378}\label{group__library__functions_ga45e8c0b1cd4f673e5f72ce758bc84378}} 
\index{Library Functions@{Library Functions}!system@{system}}
\index{system@{system}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{system()}{system()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily nothing Qore\+::system (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_gaab2d8faa88f066837e100152187e6368}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+EXTERNAL\+\_\+\+PROCESS}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{RUNTIME\+\_\+\+NOOP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__library__functions_gab480d27a192337309e6497158df8e54c}\label{group__library__functions_gab480d27a192337309e6497158df8e54c}} 
\index{Library Functions@{Library Functions}!system@{system}}
\index{system@{system}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{system()}{system()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::system (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{command }\end{DoxyParamCaption})}



executes a command and returns the exit code of the process 

\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_gab0bcd1418b3e06b5a9848d9175e4f744}{Qore\+::\+Option\+::\+HAVE\+\_\+\+SYSTEM}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_gaab2d8faa88f066837e100152187e6368}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+EXTERNAL\+\_\+\+PROCESS}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em command} & the command to execute with system() (3)\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the exit code of the process executed
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{int rc = system(\textcolor{stringliteral}{"{}ls -\/l"{}});}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}

\begin{DoxyItemize}
\item \mbox{\hyperlink{group__misc__functions_ga1d71fa075b5fd841df08e05cfdfc95c6}{backquote()}}
\item \mbox{\hyperlink{operators_backquote_operator}{the backquote operator}} 
\end{DoxyItemize}
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__library__functions_ga3c406430b305f4ee204cb1dd2638d93c}\label{group__library__functions_ga3c406430b305f4ee204cb1dd2638d93c}} 
\index{Library Functions@{Library Functions}!usleep@{usleep}}
\index{usleep@{usleep}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{usleep()}{usleep()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily nothing Qore\+::usleep (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



This function variant does nothing at all; it is only included for backwards-\/compatibility with qore prior to version 0.\+8.\+0 for functions that would ignore type errors in arguments. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+PROCESS\+\_\+\+CONTROL}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RUNTIME_NOOP}{RUNTIME\+\_\+\+NOOP}} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__library__functions_ga16b8b55b41fe579ce56a3b781b69a3f9}\label{group__library__functions_ga16b8b55b41fe579ce56a3b781b69a3f9}} 
\index{Library Functions@{Library Functions}!usleep@{usleep}}
\index{usleep@{usleep}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{usleep()}{usleep()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::usleep (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__date__and__time__functions_gaa80ee453b6a5653ac685d7e290c74e3f}{date}}}]{d }\end{DoxyParamCaption})}



Causes the current thread to sleep for a certain number of microseconds. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+PROCESS\+\_\+\+CONTROL}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em d} & A time value giving the amount of time in microseconds to sleep; this should be a \mbox{\hyperlink{basic_data_types_relative_dates}{relative date/time value}} to make the source more readable (ex\+: {\ttfamily 250ms})\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
should always return 0 for success
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{usleep(250ms);}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__library__functions_gab828a9624ba2903b88ae4d52bf6094d9}{sleep()}} for a similar function supporting second resolution
\end{DoxySeeAlso}
\begin{DoxyNote}{Note}
both \mbox{\hyperlink{group__library__functions_gab828a9624ba2903b88ae4d52bf6094d9}{sleep()}} and \mbox{\hyperlink{group__library__functions_ga3c406430b305f4ee204cb1dd2638d93c}{usleep()}} are implemented internally by calls to nanosleep() (2) if available on the current platform, otherwise both are implemented by calls to \mbox{\hyperlink{group__library__functions_ga3c406430b305f4ee204cb1dd2638d93c}{usleep()}} (3) 
\end{DoxyNote}
\mbox{\Hypertarget{group__library__functions_ga9bfa54e2c02b92b2a01f3cde2472ce6a}\label{group__library__functions_ga9bfa54e2c02b92b2a01f3cde2472ce6a}} 
\index{Library Functions@{Library Functions}!usleep@{usleep}}
\index{usleep@{usleep}!Library Functions@{Library Functions}}
\doxysubsubsection{\texorpdfstring{usleep()}{usleep()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::usleep (\begin{DoxyParamCaption}\item[{softint}]{usecs }\end{DoxyParamCaption})}



Causes the current thread to sleep for a certain number of microseconds. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+PROCESS\+\_\+\+CONTROL}}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em usecs} & The amount of time in microseconds to sleep; integer arguments are interpreted literally as a number of microseconds to sleep\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
should always return 0 for success
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{usleep(5000);}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__library__functions_gab828a9624ba2903b88ae4d52bf6094d9}{sleep()}} for a similar function supporting second resolution
\end{DoxySeeAlso}
\begin{DoxyNote}{Note}
both \mbox{\hyperlink{group__library__functions_gab828a9624ba2903b88ae4d52bf6094d9}{sleep()}} and \mbox{\hyperlink{group__library__functions_ga3c406430b305f4ee204cb1dd2638d93c}{usleep()}} are implemented internally by calls to nanosleep() (2) if available on the current platform, otherwise both are implemented by calls to \mbox{\hyperlink{group__library__functions_ga3c406430b305f4ee204cb1dd2638d93c}{usleep()}} (3) 
\end{DoxyNote}
