1RFIO_SYMLINK(3)             Rfio Library Functions             RFIO_SYMLINK(3)
2
3
4

NAME

6       rfio_symlink - create a symbolic link to a file
7

SYNOPSIS

9       #include <sys/types.h>
10       #include "rfio_api.h"
11
12       int rfio_symlink (const char *oldpath, const char *newpath);
13       int rfio_msymlink (const char *oldpath, const char *newpath);
14       int rfio_msymlink_reset ();
15       int rfio_symend ();
16

DESCRIPTION

18       rfio_symlink  creates a symbolic link newpath which contains the string
19       oldpath.
20
21       newpath may point to a non existing file.
22       If newpath exists already, it will not be overwritten.
23       Write permission is required on newpath parent.
24
25       rfio_msymlink is identical to rfio_symlink  but  keeps  the  connection
26       open  to  the  server  unless  there  are more than MAXMCON connections
27       already opened. This is useful when issuing a series of symlink  calls.
28       The   last   rfio_msymlink  call  should  be  followed  by  a  call  to
29       rfio_symend.
30
31       rfio_msymlink_reset is to be used when your program is forking. In such
32       a  case  the  permanent  connections  opened  with rfio_msymlink become
33       shared between the parent and the  child.  Use  rfio_msymlink_reset  to
34       perform  the necessary reset and close of the socket file descriptor in
35       the parent or the child in order to be sure  that  only  of  them  will
36       receice an answer from the RFIO daemon.
37
38       See NOTES section below.
39

RETURN VALUE

41       This  routine  returns  0  if the operation was successful or -1 if the
42       operation failed. In the latter case, serrno is set appropriately.
43

NOTES

45       Multiple  connections  using  rfio_msymlink  are  thread-safe  but  not
46       process-wide,  therefore  a  forked  child  can  share file descriptors
47       opened with rfio_msymlink by its  parent.  Use  rfio_msymlink_reset  in
48       such case.
49
50       Multiple  connections  behaviour  is  undefined if you work in a multi-
51       threaded environment and with  threads  not  created  using  the  LCG's
52       Cthread interface.
53

ERRORS

55       ENOENT       A component of newpath prefix does not exist or oldpath is
56                    a null pathname.
57
58       ENOMEM       Insufficient memory.
59
60       EACCES       Search permission is denied on a component of the  newpath
61                    prefix or write permission on the newpath parent directory
62                    is denied.
63
64       EFAULT       oldpath or newpath is a NULL pointer.
65
66       EEXIST       newpath already exists.
67
68       ENOTDIR      A component of the newpath prefix is not a directory.
69
70       ENAMETOOLONG The length of oldpath or newpath exceeds CA_MAXPATHLEN  or
71                    the length of a path component exceeds CA_MAXNAMELEN.
72
73       SENOSHOST    Host unknown.
74
75       SENOSSERV    Service unknown.
76
77       SECOMERR     Communication error.
78
79       SEOPNOTSUP   Not supported on Windows.
80

SEE ALSO

82       Castor_limits(4), rfio_readlink(3), rfio_unlink(3), Cthread(3)
83

AUTHOR

85       LCG Grid Deployment Team
86
87
88
89LCG                      $Date: 2005/03/31 13:13:03 $          RFIO_SYMLINK(3)
Impressum