bproc_access

Name

bproc_access -- Check if the current user may use a cluster node.

Synopsis

#include <sys/bproc.h>

int bproc_access (int node, int mode);

int _bproc_access (struct bproc_node_info_t *nodeinfo, int mode);

Arguments

node

The node number to check.

mode

The mode bits to check against.

nodeinfo

A filled-in bproc_node_info structure to check against.

Description

The current user's ability to execute processes on the specified cluster node is checked. The mode parameter specifies the mode bits to check.

See the Administrator's Guide for details of the semantics of node ownership and how the settings interact with schedulers.

Return Value

If a process may be started on the node, 0 is returned.

If the node is not available or there is an error, -1 is returned and errno is set.

Errors

ENOSYS

The BProc system is not available.

EIO

The BProc system is loaded but is not configured or active.

EACCES

This user does not have permission to start jobs on the node.

ENOMEM

Insufficient kernel memory was available.

See Also

bproc_chown(3), bproc_chgrp(3), bproc_chmod(3)