Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/p/pathmgr_symlink.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/p/pathmgr_symlink.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/p/pathmgr_symlink.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/p/pathmgr_symlink.html on line 8
Create a symlink
#include <sys/pathmgr.h>
int pathmgr_symlink( const char * path,
const char * symlink );
- path
- The path that you want to link to.
- symlink
- The name of the link that you want to create.
libc
Use the -l c option to
qcc
to link against this library.
This library is usually included automatically.
The pathmgr_symlink() function creates a symbolic link, path,
in the process manager that redirects to the path specified by symlink.
The
pathmgr_unlink()
function removes the link.
|
The symbolic link isn't permanent and is lost when the system reboots. |
- 0
- Success.
- -1
- An error occurred (errno is set).
#include <stdio.h>
#include <sys/pathmgr.h>
int main(int argc, char **argv) {
/* Create a link /mytmp --> /dev/shmem */
if(pathmgr_symlink("/dev/shmem", "/mytmp") == -1) {
perror("Can't make link");
}
getchar();
if(pathmgr_unlink("/mytmp") == -1) {
perror("Can't unlink ");
}
return 0;
}
QNX Neutrino
Safety: | |
Cancellation point |
Yes |
Interrupt handler |
No |
Signal handler |
Yes |
Thread |
Yes |
pathmgr_unlink(),
symlink(),
unlink()
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/p/pathmgr_symlink.html on line 164
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/p/pathmgr_symlink.html on line 164