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

NAME

6       rfio_unlink - remove a file entry
7

SYNOPSIS

9       #include <sys/types.h>
10       #include "rfio_api.h"
11
12       int rfio_unlink (const char *path);
13       int rfio_munlink (const char *path);
14       int rfio_munlink_reset ();
15       int rfio_unend ();
16

DESCRIPTION

18       rfio_unlink removes a file entry.
19
20       path   specifies the logical pathname relative to the current directory
21              or the full pathname.
22
23       rfio_munlink is identical to rfio_unlink but keeps the connection  open
24       to  the  server  unless there are more than MAXMCON connections already
25       opened. This is useful when issuing a series of unlink calls.  The last
26       rfio_munlink call should be followed by a call to rfio_unend.
27
28       rfio_munlink_reset  is to be used when your program is forking. In such
29       a case the permanent connections opened with rfio_munlink become shared
30       between the parent and the child. Use rfio_munlink_reset to perform the
31       necessary reset and close of the socket file descriptor in  the  parent
32       or  the  child  in  order  to be sure that only of them will receice an
33       answer from the RFIO daemon.
34
35       rfio_munlink_reset is to be used when your program is forking. In  such
36       a case the permanent connections opened with rfio_munlink become shared
37       between the parent and the child. Use rfio_munlink_reset to perform the
38       necessary  reset  and close of the socket file descriptor in the parent
39       or the child in order to be sure that only  of  them  will  receice  an
40       answer from the RFIO daemon.
41
42       See NOTES section below.
43

RETURN VALUE

45       This  routine  returns  0  if the operation was successful or -1 if the
46       operation failed. In the latter case, serrno is set appropriately.
47

NOTES

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

ERRORS

59       EPERM        path is a directory.
60
61       ENOENT       The named file does not exist or is a null pathname.
62
63       EACCES       Search  permission  is  denied  on a component of the path
64                    prefix or write permission is denied on the parent  direcā€
65                    tory or the parent has the sticky bit S_ISVTX set and
66
67                      the  effective  user  ID of the requestor does not match
68                      the owner ID of the file and
69
70                      the effective user ID of the requestor  does  not  match
71                      the owner ID of the directory and
72
73                      the file is not writable by the requestor and
74
75                      the requestor is not super-user.
76
77       EFAULT       path is a NULL pointer.
78
79       ENOTDIR      A component of path prefix is not a directory.
80
81       ENAMETOOLONG The  length of path exceeds CA_MAXPATHLEN or the length of
82                    a path component exceeds CA_MAXNAMELEN.
83
84       SENOSHOST    Host unknown.
85
86       SENOSSERV    Service unknown.
87
88       SECOMERR     Communication error.
89

SEE ALSO

91       Castor_limits(4), rfio_rmdir(3), Cthread(3)
92

AUTHOR

94       LCG Grid Deployment Team
95
96
97
98LCG                      $Date: 2005/03/31 13:13:04 $           RFIO_UNLINK(3)
Impressum