\hypertarget{group__library__functions}{}\section{Library Functions}
\label{group__library__functions}\index{Library Functions@{Library Functions}}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
nothing \hyperlink{group__library__functions_ga4a51c4086a24e58fdeafe467d8188fbf}{Qore\+::abort} ()
\begin{DoxyCompactList}\small\item\em Aborts the current program (this function does not return) \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} \hyperlink{group__library__functions_ga2552ac9c7f40c474e3b311b6178d7909}{Qore\+::basename} (\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 \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 \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 
\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} \hyperlink{group__library__functions_gaf9b9660d3eaaa087df1681f905936622}{Qore\+::dirname} (\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 \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 
\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} \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 \hyperlink{group__library__functions_ga62b13320abd1919d456e2cb84390b0b2}{Qore\+::exec} (\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 \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 
\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} \hyperlink{group__library__functions_ga38309c0ab1c849afc031dd8547b1ac65}{Qore\+::fork} ()
\begin{DoxyCompactList}\small\item\em Creates a copy of the current process with a new P\+ID; returns 0 in the child process; returns the child\textquotesingle{}s P\+ID in the parent process. \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ \hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}$<$ \hyperlink{struct_qore_1_1_net_if_info}{Net\+If\+Info} $>$ $>$ \hyperlink{group__library__functions_ga9c666f750378638e71530ced628538a3}{Qore\+::get\+\_\+netif\+\_\+list} ()
\begin{DoxyCompactList}\small\item\em returns a list of network interfaces \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ \hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}$<$ auto $>$ $>$ \hyperlink{group__library__functions_gaf410921677bddb4e52d5dfe981ada25e}{Qore\+::getaddrinfo} (\+\_\+\+\_\+7\+\_\+ \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} node, \+\_\+\+\_\+7\+\_\+ softstring service, softint family=\hyperlink{group__network__address__family__constants_gac4f81abe9d374562b41117c51950fb80}{A\+F\+\_\+\+U\+N\+S\+P\+EC}, softint flags=0)
\begin{DoxyCompactList}\small\item\em Returns a list of \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 
\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} \hyperlink{group__library__functions_ga4195fddb23078a08e36088c5b9da1c63}{Qore\+::getegid} ()
\begin{DoxyCompactList}\small\item\em Returns the effective group ID of the current process. \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} \hyperlink{group__library__functions_gae504e6dff1aa04fab954b492830df193}{Qore\+::geteuid} ()
\begin{DoxyCompactList}\small\item\em Returns the effective user ID of the current process. \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} \hyperlink{group__library__functions_gae45b3134a21e8efc465c469bbe6b58d7}{Qore\+::getgid} ()
\begin{DoxyCompactList}\small\item\em Returns the real group ID of the current process. \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$ \hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} $>$ \hyperlink{group__library__functions_ga9b6def5a046c853cb4a108d5438e6767}{Qore\+::getgroups} ()
\begin{DoxyCompactList}\small\item\em returns a list of group I\+Ds that the user is a member of \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} \hyperlink{group__library__functions_gabf75d8247386c90c83583f6cd6909e1b}{Qore\+::gethostbyaddr} (\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} addr, softint \hyperlink{group__type__conversion__functions_ga181e32c9bc8075431e88bb9bb56285a9}{type}=\hyperlink{group__network__address__family__constants_gad33bf2a0a393d1100099acfb6ca644e2}{A\+F\+\_\+\+I\+N\+ET})
\begin{DoxyCompactList}\small\item\em Returns the official hostname corresponding to the network address passed as an argument. \end{DoxyCompactList}\item 
nothing \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\+\_\+ \hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash} \hyperlink{group__library__functions_gafdb3e4dbd0e53230fd0f6fe0cbd7ffe6}{Qore\+::gethostbyaddr\+\_\+long} (\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} addr, softint \hyperlink{group__type__conversion__functions_ga181e32c9bc8075431e88bb9bb56285a9}{type}=\hyperlink{group__network__address__family__constants_gad33bf2a0a393d1100099acfb6ca644e2}{A\+F\+\_\+\+I\+N\+ET})
\begin{DoxyCompactList}\small\item\em Returns \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 \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\+\_\+ \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} \hyperlink{group__library__functions_gaa4ca4c902bdebd8b368fb2ae00bf76b2}{Qore\+::gethostbyname} (\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 \hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG} if the lookup fails. \end{DoxyCompactList}\item 
nothing \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\+\_\+ \hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash} \hyperlink{group__library__functions_ga9caff22e82dc2d3e0d13ecd19d398470}{Qore\+::gethostbyname\+\_\+long} (\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} name)
\begin{DoxyCompactList}\small\item\em Returns \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 \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 
\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} \hyperlink{group__library__functions_ga8bd938f03b1a6edb02b2a9970f5c8dda}{Qore\+::gethostname} ()
\begin{DoxyCompactList}\small\item\em Returns the hostname of the system. \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} \hyperlink{group__library__functions_ga5eb17bd4d23498ef42ba908d328421ce}{Qore\+::getpid} ()
\begin{DoxyCompactList}\small\item\em Returns the P\+ID (process ID) of the current process. \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} \hyperlink{group__library__functions_ga28a69151eb051b67a5190a9570d35603}{Qore\+::getppid} ()
\begin{DoxyCompactList}\small\item\em Returns the P\+ID (process ID) of the parent process of the current process. \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} \hyperlink{group__library__functions_gaa7cce69c66cbc6f183fa71931cdfc466}{Qore\+::getuid} ()
\begin{DoxyCompactList}\small\item\em Returns the real user ID of the current process. \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} \hyperlink{group__library__functions_ga0052a260c867683b040d0944cd85ef32}{Qore\+::kill} (softint pid, softint sig=\hyperlink{group__signal__constants_ga1a9d023101a217b83525ea6e2f7581cf}{S\+I\+G\+H\+UP})
\begin{DoxyCompactList}\small\item\em Sends a signal to a process, if no signal number is given, then \hyperlink{group__signal__constants_ga1a9d023101a217b83525ea6e2f7581cf}{Qore\+::\+S\+I\+G\+H\+UP} is sent by default. \end{DoxyCompactList}\item 
nothing \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 
\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} \hyperlink{group__library__functions_gac7494d18fbf6edfad9bec02c31455e2b}{Qore\+::qore\+\_\+get\+\_\+library\+\_\+options} ()
\begin{DoxyCompactList}\small\item\em returns all Qore library options \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} \hyperlink{group__library__functions_ga9a72550004b28a5c05b45afc196a037c}{Qore\+::qore\+\_\+set\+\_\+library\+\_\+options} (\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} opts)
\begin{DoxyCompactList}\small\item\em sets Qore runtime library options \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} \hyperlink{group__library__functions_ga6ed36f08f41864dfe007504e8b4ff5c3}{Qore\+::rand} ()
\begin{DoxyCompactList}\small\item\em Returns a random non-\/negative 64-\/bit integer number. \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} \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 
\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} \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 
\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} \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 \hyperlink{group__library__functions_gaac8ec21015bc2dc8970cad98a1c6586c}{Qore\+::setgroups} (softlist$<$ softint $>$ gids)
\begin{DoxyCompactList}\small\item\em sets the list of supplementary group I\+Ds for the current process \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} \hyperlink{group__library__functions_ga6274ab755dee8ae955d48271d9a44676}{Qore\+::setsid} ()
\begin{DoxyCompactList}\small\item\em Creates a new session lead by the calling process. \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} \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 
\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} \hyperlink{group__library__functions_gaad550dd966f91790528ec81150d5cf71}{Qore\+::sleep} (softint \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 \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 \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 \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 
\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} \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 \hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}) \end{DoxyCompactList}\item 
\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} \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 
\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} \hyperlink{group__library__functions_gab480d27a192337309e6497158df8e54c}{Qore\+::system} (\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 \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 
\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} \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 
\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} \hyperlink{group__library__functions_ga16b8b55b41fe579ce56a3b781b69a3f9}{Qore\+::usleep} (\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 \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}


\subsection{Detailed Description}
Library functions\hypertarget{group__library__functions_host_information_hash}{}\subsection{Host Information Hash}\label{group__library__functions_host_information_hash}
 \tabulinesep=1mm
\begin{longtabu} spread 0pt [c]{*{3}{|X[-1]}|}
\hline
{\bfseries Key} &{\bfseries \hyperlink{namespace_qore_1_1_type}{Type}} &{\bfseries Description}  \\\cline{1-3}
{\ttfamily name}  &\hyperlink{data_type_declarations_string_type}{string} &The official fully-\/qualified name of the host  \\\cline{1-3}
{\ttfamily aliases}  &\hyperlink{data_type_declarations_list_type}{list} of \hyperlink{data_type_declarations_string_type}{string} &Any hostname aliases for the host  \\\cline{1-3}
{\ttfamily typename}  &\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}  &\hyperlink{data_type_declarations_int_type}{int} &One of the \hyperlink{group__network__address__family__constants}{Network Address Family Constants} (either \hyperlink{group__network__address__family__constants_gad33bf2a0a393d1100099acfb6ca644e2}{Qore\+::\+A\+F\+\_\+\+I\+N\+ET} or \hyperlink{group__network__address__family__constants_ga4b71df64cd838d8f5c0c1974d3011dab}{Qore\+::\+A\+F\+\_\+\+I\+N\+E\+T6}) corresponding to the type of network addresses given  \\\cline{1-3}
{\ttfamily len}  &\hyperlink{data_type_declarations_int_type}{int} &The length of the addresses in bytes when represented in binary form  \\\cline{1-3}
{\ttfamily addresses}  &\hyperlink{data_type_declarations_list_type}{list} of \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}{}\subsection{Address Information Hash}\label{group__library__functions_address_information_hash}
 \tabulinesep=1mm
\begin{longtabu} spread 0pt [c]{*{3}{|X[-1]}|}
\hline
{\bfseries Key} &{\bfseries \hyperlink{namespace_qore_1_1_type}{Type}} &{\bfseries Description}  \\\cline{1-3}
{\ttfamily address}  &\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}  &\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}  &\hyperlink{data_type_declarations_int_type}{int} &The network address family; see Network Address Family Constants.  \\\cline{1-3}
{\ttfamily familystr}  &\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}  &\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{]} &\hyperlink{data_type_declarations_int_type}{int} &The port number corresponding to the service (if applicable)  \\\cline{1-3}
\end{longtabu}


\subsection{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}}
\subsubsection{\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\+:}
\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+P\+R\+O\+C\+E\+S\+S\+\_\+\+C\+O\+N\+T\+R\+OL}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\hyperlink{group__library__functions_ga4a51c4086a24e58fdeafe467d8188fbf}{abort}();
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__library__functions_ga3ec32747f455642fd9ce503094a5cc85}{exit()} 
\end{DoxySeeAlso}
\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}}
\subsubsection{\texorpdfstring{basename()}{basename()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} Qore\+::basename (\begin{DoxyParamCaption}\item[{\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\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}
\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}
string fn = \hyperlink{group__library__functions_ga2552ac9c7f40c474e3b311b6178d7909}{basename}(\textcolor{stringliteral}{"/usr/local/bin/file\_name"});
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__library__functions_gaf9b9660d3eaaa087df1681f905936622}{dirname()} 
\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}}
\subsubsection{\texorpdfstring{basename()}{basename()}\hspace{0.1cm}{\footnotesize\ttfamily [2/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\+:}
\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP} 
\end{DoxyParagraph}
\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}}
\subsubsection{\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\+:}
\hyperlink{group__option__constants_ga3bc61668e0fc9fd0a3fd172419e94804}{Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+C\+L\+O\+S\+E\+\_\+\+A\+L\+L\+\_\+\+FD}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+P\+R\+O\+C\+E\+S\+S\+\_\+\+C\+O\+N\+T\+R\+OL}
\end{DoxyParagraph}

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

\begin{DoxyCode}
\hyperlink{group__library__functions_gab6595c1e20c2e84bea8a17544ec35a7f}{close\_all\_fd}();
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyNote}{Note}
if there are file descriptors open by \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 \hyperlink{group__library__functions_ga38309c0ab1c849afc031dd8547b1ac65}{fork()} and \hyperlink{group__library__functions_ga62b13320abd1919d456e2cb84390b0b2}{exec()} to close any inherited descriptors, for example 
\end{DoxyNote}
\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}}
\subsubsection{\texorpdfstring{dirname()}{dirname()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} Qore\+::dirname (\begin{DoxyParamCaption}\item[{\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\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}
\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}
string dir = \hyperlink{group__library__functions_gaf9b9660d3eaaa087df1681f905936622}{dirname}(\textcolor{stringliteral}{"/usr/local/bin/file\_name"});
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__library__functions_ga2552ac9c7f40c474e3b311b6178d7909}{basename()} 
\end{DoxySeeAlso}
\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}}
\subsubsection{\texorpdfstring{dirname()}{dirname()}\hspace{0.1cm}{\footnotesize\ttfamily [2/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\+:}
\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP} 
\end{DoxyParagraph}
\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}}
\subsubsection{\texorpdfstring{errno()}{errno()}}
{\footnotesize\ttfamily \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 \hyperlink{group__error__constants}{Error Constants} for possible error code values)
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\textcolor{keywordflow}{if} (\hyperlink{group__filesystem__functions_gaac76dbcada98d67b28a84e7296587b10}{unlink}(path))
    \hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}(\textcolor{stringliteral}{"%s: %s\(\backslash\)n"}, path, \hyperlink{group__library__functions_ga13d9bb498eef9caffe641130bd8a1c73}{strerror}(\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno}()));
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__library__functions_ga13d9bb498eef9caffe641130bd8a1c73}{strerror()} for a function that gives the \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} description for the error \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}}
\subsubsection{\texorpdfstring{exec()}{exec()}}
{\footnotesize\ttfamily nothing Qore\+::exec (\begin{DoxyParamCaption}\item[{\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\+:}
\hyperlink{group__parse__options_gaab2d8faa88f066837e100152187e6368}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+E\+X\+T\+E\+R\+N\+A\+L\+\_\+\+P\+R\+O\+C\+E\+SS}, \hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+P\+R\+O\+C\+E\+S\+S\+\_\+\+C\+O\+N\+T\+R\+OL}
\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}
\hyperlink{group__library__functions_ga62b13320abd1919d456e2cb84390b0b2}{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}}
\subsubsection{\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\+:}
\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+P\+R\+O\+C\+E\+S\+S\+\_\+\+C\+O\+N\+T\+R\+OL}
\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}
\hyperlink{group__library__functions_ga3ec32747f455642fd9ce503094a5cc85}{exit}(0);
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\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}}
\subsubsection{\texorpdfstring{fork()}{fork()}}
{\footnotesize\ttfamily \hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} Qore\+::fork (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



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

This function will throw an {\ttfamily I\+L\+L\+E\+G\+A\+L-\/\+F\+O\+RK} exception if more than one thread is running

\begin{DoxyParagraph}{Platform Availability\+:}
\hyperlink{group__option__constants_ga841db19d8ad8f5d04eaf8980aed008a4}{Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+F\+O\+RK}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+P\+R\+O\+C\+E\+S\+S\+\_\+\+C\+O\+N\+T\+R\+OL}
\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
0 in the child process; returns the child\textquotesingle{}s P\+ID 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 \hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()} function
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

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

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em I\+L\+L\+E\+G\+A\+L-\/\+F\+O\+RK} & Cannot fork if more than one thread is running\\
\hline
\end{DoxyExceptions}
\begin{DoxyNote}{Note}

\begin{DoxyItemize}
\item after a \hyperlink{group__library__functions_ga38309c0ab1c849afc031dd8547b1ac65}{fork()}, the only safe call is \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 \hyperlink{group__library__functions_ga38309c0ab1c849afc031dd8547b1ac65}{fork()}
\item the signal-\/handling thread cannot be reliably started on many platforms (ex\+: Free\+B\+SD) after a \hyperlink{group__library__functions_ga38309c0ab1c849afc031dd8547b1ac65}{fork()}, therefore signal handling is disabled in the child process after a \hyperlink{group__library__functions_ga38309c0ab1c849afc031dd8547b1ac65}{fork()}
\item on Darwin (O\+S/X) threading primitives are unusable in the child process after a \hyperlink{group__library__functions_ga38309c0ab1c849afc031dd8547b1ac65}{fork()} 
\end{DoxyItemize}
\end{DoxyNote}
\mbox{\Hypertarget{group__library__functions_ga9c666f750378638e71530ced628538a3}\label{group__library__functions_ga9c666f750378638e71530ced628538a3}} 
\index{Library Functions@{Library Functions}!get\+\_\+netif\+\_\+list@{get\+\_\+netif\+\_\+list}}
\index{get\+\_\+netif\+\_\+list@{get\+\_\+netif\+\_\+list}!Library Functions@{Library Functions}}
\subsubsection{\texorpdfstring{get\+\_\+netif\+\_\+list()}{get\_netif\_list()}}
{\footnotesize\ttfamily \hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}$<$\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\+:}
\hyperlink{group__option__constants_ga39b9cdc4df2f0b13b08ce661b3f31d6b}{Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+G\+E\+T\+\_\+\+N\+E\+T\+I\+F\+\_\+\+L\+I\+ST}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\hyperlink{group__parse__options_ga213aab826b55076c29ffeecebbaea237}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+E\+X\+T\+E\+R\+N\+A\+L\+\_\+\+I\+N\+FO}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
list<hash<NetIfInfo>> l = \hyperlink{group__library__functions_ga9c666f750378638e71530ced628538a3}{get\_netif\_list}();

results \textcolor{keywordflow}{for} example into:
list: (8 elements)
  [0]=hash: (5 members)
    interface : \textcolor{stringliteral}{"lo"}
    address : \textcolor{stringliteral}{"00:00:00:00:00:00"}
    address\_desc : \textcolor{stringliteral}{"mac<00:00:00:00:00:00>"}
    family : 17
    familystr : \textcolor{stringliteral}{"mac"}
  [1]=hash: (5 members)
    interface : \textcolor{stringliteral}{"eth0"}
    address : \textcolor{stringliteral}{"44:8a:5b:ba:13:50"}
    address\_desc : \textcolor{stringliteral}{"mac<44:8a:5b:ba:13:50>"}
    family : 17
    familystr : \textcolor{stringliteral}{"mac"}
  [2]=hash: (5 members)
    interface : \textcolor{stringliteral}{"lo"}
    address : \textcolor{stringliteral}{"127.0.0.1"}
    address\_desc : \textcolor{stringliteral}{"ipv4(127.0.0.1)"}
    family : 2
    familystr : \textcolor{stringliteral}{"ipv4"}
  [3]=hash: (5 members)
    interface : \textcolor{stringliteral}{"eth0"}
    address : \textcolor{stringliteral}{"192.168.20.4"}
    address\_desc : \textcolor{stringliteral}{"ipv4(192.168.20.4)"}
    family : 2
    familystr : \textcolor{stringliteral}{"ipv4"}
  [4]=hash: (5 members)
    interface : \textcolor{stringliteral}{"lo"}
    address : \textcolor{stringliteral}{"::1"}
    address\_desc : \textcolor{stringliteral}{"ipv6[::1]"}
    family : 10
    familystr : \textcolor{stringliteral}{"ipv6"}
  [5]=hash: (5 members)
    interface : \textcolor{stringliteral}{"eth0"}
    address : \textcolor{stringliteral}{"fe80::213:3bff:fe0f:d5e1"}
    address\_desc : \textcolor{stringliteral}{"ipv6[fe80::213:3bff:fe0f:d5e1]"}
    family : 10
    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_gaf410921677bddb4e52d5dfe981ada25e}\label{group__library__functions_gaf410921677bddb4e52d5dfe981ada25e}} 
\index{Library Functions@{Library Functions}!getaddrinfo@{getaddrinfo}}
\index{getaddrinfo@{getaddrinfo}!Library Functions@{Library Functions}}
\subsubsection{\texorpdfstring{getaddrinfo()}{getaddrinfo()}}
{\footnotesize\ttfamily \hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$\hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash}$<$auto$>$ $>$ Qore\+::getaddrinfo (\begin{DoxyParamCaption}\item[{\+\_\+\+\_\+7\+\_\+ \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}]{node,  }\item[{\+\_\+\+\_\+7\+\_\+ softstring}]{service,  }\item[{softint}]{family = {\ttfamily \hyperlink{group__network__address__family__constants_gac4f81abe9d374562b41117c51950fb80}{A\+F\+\_\+\+U\+N\+S\+P\+EC}},  }\item[{softint}]{flags = {\ttfamily 0} }\end{DoxyParamCaption})}



Returns a list of \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 \hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG} but not both or a {\ttfamily Q\+O\+R\+E\+A\+D\+D\+R\+I\+N\+F\+O-\/\+G\+E\+T\+I\+N\+F\+O-\/\+E\+R\+R\+OR} exception will be thrown

\begin{DoxyParagraph}{Restrictions\+:}
\hyperlink{group__parse__options_ga213aab826b55076c29ffeecebbaea237}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+E\+X\+T\+E\+R\+N\+A\+L\+\_\+\+I\+N\+FO}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}
\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 \hyperlink{group__network__address__family__constants}{address family} for the lookup, must be one of \hyperlink{group__network__address__family__constants_gad33bf2a0a393d1100099acfb6ca644e2}{Qore\+::\+A\+F\+\_\+\+I\+N\+ET}, \hyperlink{group__network__address__family__constants_ga4b71df64cd838d8f5c0c1974d3011dab}{Qore\+::\+A\+F\+\_\+\+I\+N\+E\+T6}, or \hyperlink{group__network__address__family__constants_gac4f81abe9d374562b41117c51950fb80}{Qore\+::\+A\+F\+\_\+\+U\+N\+S\+P\+EC}, meaning to return all possible addresses \\
\hline
{\em flags} & see \hyperlink{group__network__address__information__constants}{Network Address Information Constants} for possible values to be combined with \hyperlink{operators_bitwise_or_operator}{binary or}\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a list of \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}
list<hash<auto>> l = \hyperlink{group__library__functions_gaf410921677bddb4e52d5dfe981ada25e}{getaddrinfo}(\textcolor{stringliteral}{"localhost"});
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em Q\+O\+R\+E\+A\+D\+D\+R\+I\+N\+F\+O-\/\+G\+E\+T\+I\+N\+F\+O-\/\+E\+R\+R\+OR} & 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}}
\subsubsection{\texorpdfstring{getegid()}{getegid()}}
{\footnotesize\ttfamily \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\+:}
\hyperlink{group__option__constants_gaef9b69b7df60ff7aa74035d772add3c6}{Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+U\+N\+I\+X\+\_\+\+U\+S\+E\+R\+M\+GT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\hyperlink{group__parse__options_ga213aab826b55076c29ffeecebbaea237}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+E\+X\+T\+E\+R\+N\+A\+L\+\_\+\+I\+N\+FO}
\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
the effective group ID of the current process
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
int egid = \hyperlink{group__library__functions_ga4195fddb23078a08e36088c5b9da1c63}{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}}
\subsubsection{\texorpdfstring{geteuid()}{geteuid()}}
{\footnotesize\ttfamily \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\+:}
\hyperlink{group__option__constants_gaef9b69b7df60ff7aa74035d772add3c6}{Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+U\+N\+I\+X\+\_\+\+U\+S\+E\+R\+M\+GT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\hyperlink{group__parse__options_ga213aab826b55076c29ffeecebbaea237}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+E\+X\+T\+E\+R\+N\+A\+L\+\_\+\+I\+N\+FO}
\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
the effective user ID of the current process
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
int euid = \hyperlink{group__library__functions_gae504e6dff1aa04fab954b492830df193}{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}}
\subsubsection{\texorpdfstring{getgid()}{getgid()}}
{\footnotesize\ttfamily \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\+:}
\hyperlink{group__option__constants_gaef9b69b7df60ff7aa74035d772add3c6}{Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+U\+N\+I\+X\+\_\+\+U\+S\+E\+R\+M\+GT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\hyperlink{group__parse__options_ga213aab826b55076c29ffeecebbaea237}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+E\+X\+T\+E\+R\+N\+A\+L\+\_\+\+I\+N\+FO}
\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
the real group ID of the current process
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
int gid = \hyperlink{group__library__functions_gae45b3134a21e8efc465c469bbe6b58d7}{getgid}();
\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__library__functions_ga9b6def5a046c853cb4a108d5438e6767}\label{group__library__functions_ga9b6def5a046c853cb4a108d5438e6767}} 
\index{Library Functions@{Library Functions}!getgroups@{getgroups}}
\index{getgroups@{getgroups}!Library Functions@{Library Functions}}
\subsubsection{\texorpdfstring{getgroups()}{getgroups()}}
{\footnotesize\ttfamily \hyperlink{group__type__conversion__functions_ga4b52a1cbee7a3aed46c32cb0a938629c}{list}$<$\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}$>$ Qore\+::getgroups (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



returns a list of group I\+Ds that the user is a member of 

\begin{DoxyParagraph}{Platform Availability\+:}
\hyperlink{group__option__constants_gaef9b69b7df60ff7aa74035d772add3c6}{Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+U\+N\+I\+X\+\_\+\+U\+S\+E\+R\+M\+GT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\hyperlink{group__parse__options_ga213aab826b55076c29ffeecebbaea237}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+E\+X\+T\+E\+R\+N\+A\+L\+\_\+\+I\+N\+FO}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
list<int> l = \hyperlink{group__library__functions_ga9b6def5a046c853cb4a108d5438e6767}{getgroups}();
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
a list of group I\+Ds that the user is a member of
\end{DoxyReturn}
\begin{DoxySince}{Since}
Qore 0.\+8.\+11.\+1 
\end{DoxySince}
\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}}
\subsubsection{\texorpdfstring{gethostbyaddr()}{gethostbyaddr()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} Qore\+::gethostbyaddr (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}]{addr,  }\item[{softint}]{type = {\ttfamily \hyperlink{group__network__address__family__constants_gad33bf2a0a393d1100099acfb6ca644e2}{A\+F\+\_\+\+I\+N\+ET}} }\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 G\+E\+T\+H\+O\+S\+T\+B\+Y\+A\+D\+D\+R-\/\+E\+R\+R\+OR} exception will be thrown.

\begin{DoxyParagraph}{Restrictions\+:}
\hyperlink{group__parse__options_ga213aab826b55076c29ffeecebbaea237}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+E\+X\+T\+E\+R\+N\+A\+L\+\_\+\+I\+N\+FO}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em addr} & the address to look up \\
\hline
{\em type} & the network address family; see \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}
*string hostname = \hyperlink{group__library__functions_gabf75d8247386c90c83583f6cd6909e1b}{gethostbyaddr}(\textcolor{stringliteral}{"192.168.0.33"});
\textcolor{keywordflow}{if} (!exists hostname)
    \hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}(\textcolor{stringliteral}{"address lookup on 192.168.0.33 failed\(\backslash\)n"}, host);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em G\+E\+T\+H\+O\+S\+T\+B\+Y\+A\+D\+D\+R-\/\+E\+R\+R\+OR} & invalid address for the given family or invalid address family\\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__library__functions_gafdb3e4dbd0e53230fd0f6fe0cbd7ffe6}{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_ga7a7e2b5705964d0180b42dc8707e6090}\label{group__library__functions_ga7a7e2b5705964d0180b42dc8707e6090}} 
\index{Library Functions@{Library Functions}!gethostbyaddr@{gethostbyaddr}}
\index{gethostbyaddr@{gethostbyaddr}!Library Functions@{Library Functions}}
\subsubsection{\texorpdfstring{gethostbyaddr()}{gethostbyaddr()}\hspace{0.1cm}{\footnotesize\ttfamily [2/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\+:}
\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__library__functions_gafdb3e4dbd0e53230fd0f6fe0cbd7ffe6}\label{group__library__functions_gafdb3e4dbd0e53230fd0f6fe0cbd7ffe6}} 
\index{Library Functions@{Library Functions}!gethostbyaddr\+\_\+long@{gethostbyaddr\+\_\+long}}
\index{gethostbyaddr\+\_\+long@{gethostbyaddr\+\_\+long}!Library Functions@{Library Functions}}
\subsubsection{\texorpdfstring{gethostbyaddr\+\_\+long()}{gethostbyaddr\_long()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash} Qore\+::gethostbyaddr\+\_\+long (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}]{addr,  }\item[{softint}]{type = {\ttfamily \hyperlink{group__network__address__family__constants_gad33bf2a0a393d1100099acfb6ca644e2}{A\+F\+\_\+\+I\+N\+ET}} }\end{DoxyParamCaption})}



Returns \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 G\+E\+T\+H\+O\+S\+T\+B\+Y\+A\+D\+D\+R-\/\+E\+R\+R\+OR} exception will be thrown.

\begin{DoxyParagraph}{Restrictions\+:}
\hyperlink{group__parse__options_ga213aab826b55076c29ffeecebbaea237}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+E\+X\+T\+E\+R\+N\+A\+L\+\_\+\+I\+N\+FO}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em addr} & the address to look up \\
\hline
{\em type} & the network address family; see \hyperlink{group__network__address__family__constants}{Network Address Family Constants} for valid values\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\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}
*hash ah = \hyperlink{group__library__functions_gafdb3e4dbd0e53230fd0f6fe0cbd7ffe6}{gethostbyaddr\_long}(\textcolor{stringliteral}{"192.168.0.33"});
\textcolor{keywordflow}{if} (!exists ah)
    \hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}(\textcolor{stringliteral}{"address lookup on 192.168.0.33 failed\(\backslash\)n"}, host);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em G\+E\+T\+H\+O\+S\+T\+B\+Y\+A\+D\+D\+R-\/\+E\+R\+R\+OR} & invalid address for the given family or invalid address family\\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__library__functions_gabf75d8247386c90c83583f6cd6909e1b}{gethostbyaddr()} for a simpler version of this function that returns just a single hostname for the address 
\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}}
\subsubsection{\texorpdfstring{gethostbyaddr\+\_\+long()}{gethostbyaddr\_long()}\hspace{0.1cm}{\footnotesize\ttfamily [2/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\+:}
\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP} 
\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}}
\subsubsection{\texorpdfstring{gethostbyname()}{gethostbyname()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string} Qore\+::gethostbyname (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}]{name }\end{DoxyParamCaption})}



Returns the first address corresponding to the hostname passed as an argument or \hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG} if the lookup fails. 

\begin{DoxyParagraph}{Restrictions\+:}
\hyperlink{group__parse__options_ga213aab826b55076c29ffeecebbaea237}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+E\+X\+T\+E\+R\+N\+A\+L\+\_\+\+I\+N\+FO}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}
\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 \hyperlink{basic_data_types_nothing}{N\+O\+T\+H\+I\+NG} if the lookup fails
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

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

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__library__functions_ga9caff22e82dc2d3e0d13ecd19d398470}{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_gab94736fbd3118f66eaa40c9ceb7d06ae}\label{group__library__functions_gab94736fbd3118f66eaa40c9ceb7d06ae}} 
\index{Library Functions@{Library Functions}!gethostbyname@{gethostbyname}}
\index{gethostbyname@{gethostbyname}!Library Functions@{Library Functions}}
\subsubsection{\texorpdfstring{gethostbyname()}{gethostbyname()}\hspace{0.1cm}{\footnotesize\ttfamily [2/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\+:}
\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP} 
\end{DoxyParagraph}
\mbox{\Hypertarget{group__library__functions_ga9caff22e82dc2d3e0d13ecd19d398470}\label{group__library__functions_ga9caff22e82dc2d3e0d13ecd19d398470}} 
\index{Library Functions@{Library Functions}!gethostbyname\+\_\+long@{gethostbyname\+\_\+long}}
\index{gethostbyname\+\_\+long@{gethostbyname\+\_\+long}!Library Functions@{Library Functions}}
\subsubsection{\texorpdfstring{gethostbyname\+\_\+long()}{gethostbyname\_long()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \hyperlink{group__type__conversion__functions_ga0231dbb472dd230310af7c7c34f56e92}{hash} Qore\+::gethostbyname\+\_\+long (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}]{name }\end{DoxyParamCaption})}



Returns \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\+:}
\hyperlink{group__parse__options_ga213aab826b55076c29ffeecebbaea237}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+E\+X\+T\+E\+R\+N\+A\+L\+\_\+\+I\+N\+FO}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em name} & the name to look up\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\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}
*hash ah = \hyperlink{group__library__functions_ga9caff22e82dc2d3e0d13ecd19d398470}{gethostbyname\_long}(host);
\textcolor{keywordflow}{if} (!exists host)
    \hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}(\textcolor{stringliteral}{"address lookup on %y failed; hostname unknown\(\backslash\)n"}, host);
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__library__functions_gaa4ca4c902bdebd8b368fb2ae00bf76b2}{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_gace5c385a0af1e9b227618b94b2ccd2cf}\label{group__library__functions_gace5c385a0af1e9b227618b94b2ccd2cf}} 
\index{Library Functions@{Library Functions}!gethostbyname\+\_\+long@{gethostbyname\+\_\+long}}
\index{gethostbyname\+\_\+long@{gethostbyname\+\_\+long}!Library Functions@{Library Functions}}
\subsubsection{\texorpdfstring{gethostbyname\+\_\+long()}{gethostbyname\_long()}\hspace{0.1cm}{\footnotesize\ttfamily [2/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\+:}
\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP} 
\end{DoxyParagraph}
\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}}
\subsubsection{\texorpdfstring{gethostname()}{gethostname()}}
{\footnotesize\ttfamily \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\+:}
\hyperlink{group__parse__options_ga213aab826b55076c29ffeecebbaea237}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+E\+X\+T\+E\+R\+N\+A\+L\+\_\+\+I\+N\+FO}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
string host = \hyperlink{group__library__functions_ga8bd938f03b1a6edb02b2a9970f5c8dda}{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}}
\subsubsection{\texorpdfstring{getpid()}{getpid()}}
{\footnotesize\ttfamily \hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} Qore\+::getpid (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the P\+ID (process ID) of the current process. 

\begin{DoxyReturn}{Returns}
the P\+ID (process ID) of the current process
\end{DoxyReturn}
\begin{DoxyParagraph}{Restrictions\+:}
\hyperlink{group__parse__options_ga213aab826b55076c29ffeecebbaea237}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+E\+X\+T\+E\+R\+N\+A\+L\+\_\+\+I\+N\+FO}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
int pid = \hyperlink{group__library__functions_ga5eb17bd4d23498ef42ba908d328421ce}{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}}
\subsubsection{\texorpdfstring{getppid()}{getppid()}}
{\footnotesize\ttfamily \hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} Qore\+::getppid (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the P\+ID (process ID) of the parent process of the current process. 

\begin{DoxyParagraph}{Platform Availability\+:}
\hyperlink{group__option__constants_ga6005570874832f8305631c49cbd54fa3}{Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+G\+E\+T\+P\+P\+ID}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\hyperlink{group__parse__options_ga213aab826b55076c29ffeecebbaea237}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+E\+X\+T\+E\+R\+N\+A\+L\+\_\+\+I\+N\+FO}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\hyperlink{code_flags_RET_VALUE_ONLY}{R\+E\+T\+\_\+\+V\+A\+L\+U\+E\+\_\+\+O\+N\+LY}
\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
the P\+ID (process ID) of the parent process of the current process
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
int ppid = HAVE\_GETPPID ? \hyperlink{group__library__functions_ga28a69151eb051b67a5190a9570d35603}{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}}
\subsubsection{\texorpdfstring{getuid()}{getuid()}}
{\footnotesize\ttfamily \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\+:}
\hyperlink{group__option__constants_gaef9b69b7df60ff7aa74035d772add3c6}{Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+U\+N\+I\+X\+\_\+\+U\+S\+E\+R\+M\+GT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\hyperlink{group__parse__options_ga213aab826b55076c29ffeecebbaea237}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+E\+X\+T\+E\+R\+N\+A\+L\+\_\+\+I\+N\+FO}
\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
the real user ID of the current process
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
int uid = \hyperlink{group__library__functions_gaa7cce69c66cbc6f183fa71931cdfc466}{getuid}();
\end{DoxyCode}
 
\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}}
\subsubsection{\texorpdfstring{kill()}{kill()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} Qore\+::kill (\begin{DoxyParamCaption}\item[{softint}]{pid,  }\item[{softint}]{sig = {\ttfamily \hyperlink{group__signal__constants_ga1a9d023101a217b83525ea6e2f7581cf}{S\+I\+G\+H\+UP}} }\end{DoxyParamCaption})}



Sends a signal to a process, if no signal number is given, then \hyperlink{group__signal__constants_ga1a9d023101a217b83525ea6e2f7581cf}{Qore\+::\+S\+I\+G\+H\+UP} is sent by default. 

\begin{DoxyParagraph}{Platform Availability\+:}
\hyperlink{group__option__constants_ga905db647155bcf54168df7fc7e6b96b6}{Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+K\+I\+LL}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\hyperlink{group__parse__options_gaab2d8faa88f066837e100152187e6368}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+E\+X\+T\+E\+R\+N\+A\+L\+\_\+\+P\+R\+O\+C\+E\+SS}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em pid} & the pid argument can have the following interpretations\+:
\begin{DoxyItemize}
\item {\ttfamily $>$ 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 \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 \hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()} for the error
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\textcolor{keywordflow}{if} (\hyperlink{group__library__functions_ga0052a260c867683b040d0944cd85ef32}{kill}(pid, SIGTERM))
    \hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}(\textcolor{stringliteral}{"error sending signal to pid %d: %s\(\backslash\)n"}, pid, \hyperlink{group__library__functions_ga13d9bb498eef9caffe641130bd8a1c73}{strerror}());
\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}}
\subsubsection{\texorpdfstring{kill()}{kill()}\hspace{0.1cm}{\footnotesize\ttfamily [2/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\+:}
\hyperlink{group__parse__options_gaab2d8faa88f066837e100152187e6368}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+E\+X\+T\+E\+R\+N\+A\+L\+\_\+\+P\+R\+O\+C\+E\+SS}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP} 
\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}}
\subsubsection{\texorpdfstring{qore\+\_\+get\+\_\+library\+\_\+options()}{qore\_get\_library\_options()}}
{\footnotesize\ttfamily \hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} Qore\+::qore\+\_\+get\+\_\+library\+\_\+options (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



returns all Qore library options 

\begin{DoxyParagraph}{Restrictions\+:}
\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+P\+R\+O\+C\+E\+S\+S\+\_\+\+C\+O\+N\+T\+R\+OL}
\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
all Qore library options; see \hyperlink{group__library__option__constants}{Qore Library Option Constants} for more information
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\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}}
\subsubsection{\texorpdfstring{qore\+\_\+set\+\_\+library\+\_\+options()}{qore\_set\_library\_options()}}
{\footnotesize\ttfamily \hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} Qore\+::qore\+\_\+set\+\_\+library\+\_\+options (\begin{DoxyParamCaption}\item[{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}]{opts }\end{DoxyParamCaption})}



sets Qore runtime library options 

\begin{DoxyParagraph}{Restrictions\+:}
\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+P\+R\+O\+C\+E\+S\+S\+\_\+\+C\+O\+N\+T\+R\+OL}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em opts} & the runtime options to set, binary-\/anded with \hyperlink{group__library__option__constants_ga5515e5a1a7ae8cab55024767f0d0cd94}{Qore\+::\+Q\+L\+O\+\_\+\+R\+U\+N\+T\+I\+M\+E\+\_\+\+O\+P\+TS}; see \hyperlink{group__library__option__constants}{Qore Library Option Constants} and \hyperlink{group__library__option__constants_ga5515e5a1a7ae8cab55024767f0d0cd94}{Q\+L\+O\+\_\+\+R\+U\+N\+T\+I\+M\+E\+\_\+\+O\+P\+TS} for more information\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the options used
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\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}}
\subsubsection{\texorpdfstring{rand()}{rand()}}
{\footnotesize\ttfamily \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\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
int num = \hyperlink{group__library__functions_ga6ed36f08f41864dfe007504e8b4ff5c3}{rand}();
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__library__functions_gaeb017e3b5ea8ff39e270e844f280e32b}{srand()} for a function to seed the random \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}}
\subsubsection{\texorpdfstring{setegid()}{setegid()}}
{\footnotesize\ttfamily \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\+:}
\hyperlink{group__option__constants_gaef9b69b7df60ff7aa74035d772add3c6}{Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+U\+N\+I\+X\+\_\+\+U\+S\+E\+R\+M\+GT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+P\+R\+O\+C\+E\+S\+S\+\_\+\+C\+O\+N\+T\+R\+OL}
\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 \hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()} and/or \hyperlink{group__library__functions_ga13d9bb498eef9caffe641130bd8a1c73}{strerror()} can be used to retrieve the error
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\textcolor{keywordflow}{if} (\hyperlink{group__library__functions_ga978d06ec48b315287cd514601645e21b}{setegid}(gid))
    \hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}(\textcolor{stringliteral}{"setegid %d: %s\(\backslash\)n"}, gid, \hyperlink{group__library__functions_ga13d9bb498eef9caffe641130bd8a1c73}{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}}
\subsubsection{\texorpdfstring{seteuid()}{seteuid()}}
{\footnotesize\ttfamily \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\+:}
\hyperlink{group__option__constants_ga5fe2ab14ea36c83e7d032a79bd404622}{Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+S\+E\+T\+E\+U\+ID}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+P\+R\+O\+C\+E\+S\+S\+\_\+\+C\+O\+N\+T\+R\+OL}
\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 \hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()} and/or \hyperlink{group__library__functions_ga13d9bb498eef9caffe641130bd8a1c73}{strerror()} can be used to retrieve the error
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\textcolor{keywordflow}{if} (\hyperlink{group__library__functions_ga6bc0ecedb69f16a65b91bbb15d281446}{seteuid}(uid))
    \hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}(\textcolor{stringliteral}{"seteuid %d: %s\(\backslash\)n"}, uid, \hyperlink{group__library__functions_ga13d9bb498eef9caffe641130bd8a1c73}{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}}
\subsubsection{\texorpdfstring{setgid()}{setgid()}}
{\footnotesize\ttfamily \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\+:}
\hyperlink{group__option__constants_gaef9b69b7df60ff7aa74035d772add3c6}{Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+U\+N\+I\+X\+\_\+\+U\+S\+E\+R\+M\+GT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+P\+R\+O\+C\+E\+S\+S\+\_\+\+C\+O\+N\+T\+R\+OL}
\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 \hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()} and/or \hyperlink{group__library__functions_ga13d9bb498eef9caffe641130bd8a1c73}{strerror()} can be used to retrieve the error
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\textcolor{keywordflow}{if} (\hyperlink{group__library__functions_ga643d15328846a7d64139c34a29efe53b}{setgid}(gid))
    \hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}(\textcolor{stringliteral}{"setgid %d: %s\(\backslash\)n"}, gid, \hyperlink{group__library__functions_ga13d9bb498eef9caffe641130bd8a1c73}{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}}
\subsubsection{\texorpdfstring{setgroups()}{setgroups()}}
{\footnotesize\ttfamily nothing Qore\+::setgroups (\begin{DoxyParamCaption}\item[{softlist$<$ softint $>$}]{gids }\end{DoxyParamCaption})}



sets the list of supplementary group I\+Ds for the current process 

\begin{DoxyParagraph}{Platform Availability\+:}
\hyperlink{group__option__constants_gaef9b69b7df60ff7aa74035d772add3c6}{Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+U\+N\+I\+X\+\_\+\+U\+S\+E\+R\+M\+GT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+P\+R\+O\+C\+E\+S\+S\+\_\+\+C\+O\+N\+T\+R\+OL}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\hyperlink{group__library__functions_gaac8ec21015bc2dc8970cad98a1c6586c}{setgroups}(l);
\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em gids} & a list of supplementary group I\+Ds 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}}
\subsubsection{\texorpdfstring{setsid()}{setsid()}}
{\footnotesize\ttfamily \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 \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, \hyperlink{group__library__functions_ga6274ab755dee8ae955d48271d9a44676}{setsid()} returns -\/1 and \hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()} and/or \hyperlink{group__library__functions_ga13d9bb498eef9caffe641130bd8a1c73}{strerror()} can be used to check the error.
\end{DoxyReturn}
\begin{DoxyParagraph}{Restrictions\+:}
\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+P\+R\+O\+C\+E\+S\+S\+\_\+\+C\+O\+N\+T\+R\+OL}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\textcolor{keywordflow}{if} (\hyperlink{group__library__functions_ga6274ab755dee8ae955d48271d9a44676}{setsid}() == -1)
    \hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}(\textcolor{stringliteral}{"setsid(): %s\(\backslash\)n"}, \hyperlink{group__library__functions_ga13d9bb498eef9caffe641130bd8a1c73}{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}}
\subsubsection{\texorpdfstring{setuid()}{setuid()}}
{\footnotesize\ttfamily \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\+:}
\hyperlink{group__option__constants_gaef9b69b7df60ff7aa74035d772add3c6}{Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+U\+N\+I\+X\+\_\+\+U\+S\+E\+R\+M\+GT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+P\+R\+O\+C\+E\+S\+S\+\_\+\+C\+O\+N\+T\+R\+OL}
\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 \hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()} and/or \hyperlink{group__library__functions_ga13d9bb498eef9caffe641130bd8a1c73}{strerror()} can be used to retrieve the error
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\textcolor{keywordflow}{if} (\hyperlink{group__library__functions_gad740d1b241a725df36965aa2bfb50231}{setuid}(uid))
    \hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}(\textcolor{stringliteral}{"setuid %d: %s\(\backslash\)n"}, uid, \hyperlink{group__library__functions_ga13d9bb498eef9caffe641130bd8a1c73}{strerror}());
\end{DoxyCode}
 
\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}}
\subsubsection{\texorpdfstring{sleep()}{sleep()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \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\+:}
\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+P\+R\+O\+C\+E\+S\+S\+\_\+\+C\+O\+N\+T\+R\+OL}
\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 \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 \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}
\hyperlink{group__library__functions_gaad550dd966f91790528ec81150d5cf71}{sleep}(10s);
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__library__functions_ga9bfa54e2c02b92b2a01f3cde2472ce6a}{usleep()} for a similar function supporting microsecond resolution 
\end{DoxySeeAlso}
\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}}
\subsubsection{\texorpdfstring{sleep()}{sleep()}\hspace{0.1cm}{\footnotesize\ttfamily [2/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\+:}
\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+P\+R\+O\+C\+E\+S\+S\+\_\+\+C\+O\+N\+T\+R\+OL}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP} 
\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}}
\subsubsection{\texorpdfstring{srand()}{srand()}\hspace{0.1cm}{\footnotesize\ttfamily [1/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\+:}
\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+P\+R\+O\+C\+E\+S\+S\+\_\+\+C\+O\+N\+T\+R\+OL}
\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}
\hyperlink{group__library__functions_gaeb017e3b5ea8ff39e270e844f280e32b}{srand}(\hyperlink{group__date__and__time__functions_ga23f067a4f82596346d4fef09782e1945}{now}());
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__library__functions_ga6ed36f08f41864dfe007504e8b4ff5c3}{rand()} for a function that returns a random \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_gae6dd9a1ccae25a097d61cf0575161075}\label{group__library__functions_gae6dd9a1ccae25a097d61cf0575161075}} 
\index{Library Functions@{Library Functions}!srand@{srand}}
\index{srand@{srand}!Library Functions@{Library Functions}}
\subsubsection{\texorpdfstring{srand()}{srand()}\hspace{0.1cm}{\footnotesize\ttfamily [2/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\+:}
\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+P\+R\+O\+C\+E\+S\+S\+\_\+\+C\+O\+N\+T\+R\+OL}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP} 
\end{DoxyParagraph}
\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}}
\subsubsection{\texorpdfstring{strerror()}{strerror()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \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 \hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno()}) 

\begin{DoxyParagraph}{Code Flags\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em err} & the error code to retrieve the description for (generally provided by \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}
\textcolor{keywordflow}{if} (\hyperlink{group__filesystem__functions_gaac76dbcada98d67b28a84e7296587b10}{unlink}(path))
    \hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}(\textcolor{stringliteral}{"%s: %s\(\backslash\)n"}, path, \hyperlink{group__library__functions_ga13d9bb498eef9caffe641130bd8a1c73}{strerror}(\hyperlink{group__library__functions_gabcf45c25ca1234fc8c54761750324cda}{errno}()));
\end{DoxyCode}
 
\end{DoxyParagraph}
\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}}
\subsubsection{\texorpdfstring{strerror()}{strerror()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \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\+:}
\hyperlink{code_flags_CONSTANT}{C\+O\+N\+S\+T\+A\+NT}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}
\textcolor{keywordflow}{if} (\hyperlink{group__filesystem__functions_gaac76dbcada98d67b28a84e7296587b10}{unlink}(path))
    \hyperlink{group__string__functions_ga32070517a9f8a70a32ef48f83a6f128e}{printf}(\textcolor{stringliteral}{"%s: %s\(\backslash\)n"}, path, \hyperlink{group__library__functions_ga13d9bb498eef9caffe641130bd8a1c73}{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_gab480d27a192337309e6497158df8e54c}\label{group__library__functions_gab480d27a192337309e6497158df8e54c}} 
\index{Library Functions@{Library Functions}!system@{system}}
\index{system@{system}!Library Functions@{Library Functions}}
\subsubsection{\texorpdfstring{system()}{system()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} Qore\+::system (\begin{DoxyParamCaption}\item[{\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\+:}
\hyperlink{group__option__constants_gab0bcd1418b3e06b5a9848d9175e4f744}{Qore\+::\+Option\+::\+H\+A\+V\+E\+\_\+\+S\+Y\+S\+T\+EM}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\hyperlink{group__parse__options_gaab2d8faa88f066837e100152187e6368}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+E\+X\+T\+E\+R\+N\+A\+L\+\_\+\+P\+R\+O\+C\+E\+SS}
\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}
int rc = \hyperlink{group__library__functions_gab480d27a192337309e6497158df8e54c}{system}(\textcolor{stringliteral}{"ls -l"});
\end{DoxyCode}

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

\begin{DoxyItemize}
\item \hyperlink{group__misc__functions_gaee11d366f841cd34c9aa6ac8c7c49577}{backquote()}
\item \hyperlink{operators_backquote_operator}{the backquote operator} 
\end{DoxyItemize}
\end{DoxySeeAlso}
\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}}
\subsubsection{\texorpdfstring{system()}{system()}\hspace{0.1cm}{\footnotesize\ttfamily [2/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\+:}
\hyperlink{group__parse__options_gaab2d8faa88f066837e100152187e6368}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+E\+X\+T\+E\+R\+N\+A\+L\+\_\+\+P\+R\+O\+C\+E\+SS}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP} 
\end{DoxyParagraph}
\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}}
\subsubsection{\texorpdfstring{usleep()}{usleep()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily \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\+:}
\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+P\+R\+O\+C\+E\+S\+S\+\_\+\+C\+O\+N\+T\+R\+OL}
\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}
\hyperlink{group__library__functions_ga9bfa54e2c02b92b2a01f3cde2472ce6a}{usleep}(5000);
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__library__functions_gaad550dd966f91790528ec81150d5cf71}{sleep()} for a similar function supporting second resolution
\end{DoxySeeAlso}
\begin{DoxyNote}{Note}
both \hyperlink{group__library__functions_gaad550dd966f91790528ec81150d5cf71}{sleep()} and \hyperlink{group__library__functions_ga9bfa54e2c02b92b2a01f3cde2472ce6a}{usleep()} are implemented internally by calls to nanosleep() (2) if available on the current platform, otherwise both are implemented by calls to \hyperlink{group__library__functions_ga9bfa54e2c02b92b2a01f3cde2472ce6a}{usleep()} (3) 
\end{DoxyNote}
\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}}
\subsubsection{\texorpdfstring{usleep()}{usleep()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily \hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int} Qore\+::usleep (\begin{DoxyParamCaption}\item[{\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\+:}
\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+P\+R\+O\+C\+E\+S\+S\+\_\+\+C\+O\+N\+T\+R\+OL}
\end{DoxyParagraph}

\begin{DoxyParams}{Parameters}
{\em d} & A time value giving the amount of time in microseconds to sleep; this should be a \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}
\hyperlink{group__library__functions_ga9bfa54e2c02b92b2a01f3cde2472ce6a}{usleep}(250ms);
\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__library__functions_gaad550dd966f91790528ec81150d5cf71}{sleep()} for a similar function supporting second resolution
\end{DoxySeeAlso}
\begin{DoxyNote}{Note}
both \hyperlink{group__library__functions_gaad550dd966f91790528ec81150d5cf71}{sleep()} and \hyperlink{group__library__functions_ga9bfa54e2c02b92b2a01f3cde2472ce6a}{usleep()} are implemented internally by calls to nanosleep() (2) if available on the current platform, otherwise both are implemented by calls to \hyperlink{group__library__functions_ga9bfa54e2c02b92b2a01f3cde2472ce6a}{usleep()} (3) 
\end{DoxyNote}
\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}}
\subsubsection{\texorpdfstring{usleep()}{usleep()}\hspace{0.1cm}{\footnotesize\ttfamily [3/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\+:}
\hyperlink{group__parse__options_ga10d8e3f76c427b0f974529de572dd0ec}{Qore\+::\+P\+O\+\_\+\+N\+O\+\_\+\+P\+R\+O\+C\+E\+S\+S\+\_\+\+C\+O\+N\+T\+R\+OL}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\hyperlink{code_flags_RUNTIME_NOOP}{R\+U\+N\+T\+I\+M\+E\+\_\+\+N\+O\+OP} 
\end{DoxyParagraph}
