\subsection{\funcnameXBnewgrp{}}

\begin{expara}

int \funcnameXBnewgrp{}(const int fd, const char * group)

\end{expara}

The function \funcXBnewgrp{} is used to select a new primary group as the user's primary group.

\exampletext{fd} is a file descriptor which was previously returned by a successful call to \funcXBopen{} or equivalent.

\exampletext{group} is the required group name to be selected.
If the user has \textit{write admin file} privilege, this may be any valid group name, otherwise the group must be the
user's default group or one of the user's supplementary groups.

\subsubsection{Return values}
The function returns 0 if successful otherwise one of the error codes listed on page \pageref{errorcodes} onwards.

\subsection{\funcnameXBsetqueue{}}

\begin{expara}

int \funcnameXBsetqueue{}(const int fd, const char *queuename)

\end{expara}

The function \funcXBsetqueue{} is used to allocate a queue name for transactions with the API. This may effect the selection
of jobs and job titles.

\exampletext{fd} is a file descriptor which was previously returned by a successful call to \funcXBopen{} or equivalent.

\exampletext{queuename} is the name of the proposed queue or NULL to delete a previous queue name.

\subsubsection{Return values}
The function returns 0 if successful otherwise one of the error codes listed on page \pageref{errorcodes} onwards.

