change the default network pathname prefix
#include <sys/prfx.h> int qnx_prefix_setroot( char *str );
The qnx_prefix_setroot() function changes the default network prefix root of the calling process. This is inherited by all children created after it's changed. The new root must be of the form //number, where number is a logical node id.
This function may impact your ability to locate any new files. If the current directory isn't prefixed with a node number (the normal case) then the current directory may jump to a new filesystem or become invalid as a result of the changed prefix root. |
Zero on success, or -1 if str exceeds _QNX_PREFIX_SIZE_MAX (as defined in <limits.h>).
#include <stdio.h> #include <sys/prfx.h> void main() { printf( "Prefix root is %s\n", qnx_prefix_getroot() ); qnx_prefix_setroot("//99"); printf( "Prefix root is %s\n", qnx_prefix_getroot() ); }
QNX
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | Yes |