1RFIO_UNLINK(3)                   Rfio      Library      Functions
2RFIO_UNLINK(3)
3
4
5
6[1mNAME[0m
7       rfio_unlink ‐ remove a file entry
8
9[1mSYNOPSIS[0m
10       [1m#include <sys/types.h>[0m
11       [1m#include "rfio_api.h"[0m
12
13       [1mint rfio_unlink (const char *[4m[22mpath[24m[1m);[0m
14       [1mint rfio_munlink (const char *[4m[22mpath[24m[1m);[0m
15       [1mint rfio_munlink_reset ();[0m
16       [1mint rfio_unend ();[0m
17
18[1mDESCRIPTION[0m
19       [1mrfio_unlink [22mremoves a file entry.
20
21       [4mpath[24m   specifies the logical pathname  relative  to
22the current directory
23              or the full pathname.
24
25       [1mrfio_munlink [22mis identical to [1mrfio_unlink [22mbut
26keeps the connection  open
27       to  the  server  unless there are more than  MAXMCON  con‐
28nections already
29       opened.  This  is  useful  when issuing a series of unlink
30calls.  The last
31       [1mrfio_munlink [22mcall should be followed by a  call  to
32[1mrfio_unend[22m.
33
34       [1mrfio_munlink_reset  [22mis to be used when your program
35is forking. In such
36       a  case  the  permanent  connections  opened  with   [1mr‐
37fio_munlink [22mbecome shared
38       between  the parent and the child. Use [1mrfio_munlink_re‐
39set [22mto perform the
40       necessary reset and close of the socket file descriptor in
41the  parent
42       or   the   child   in  order  to be sure that only of them
43will receice an
44       answer from the RFIO daemon.
45
46       [1mrfio_munlink_reset [22mis to be used when your  program
47is forking. In  such
48       a   case  the  permanent  connections  opened  with  [1mr‐
49fio_munlink [22mbecome shared
50       between the parent and the child. Use  [1mrfio_munlink_re‐
51set [22mto perform the
52       necessary   reset  and close of the socket file descriptor
53in the parent
54       or the child in order to be sure that only  of  them  will
55receice  an
56       answer from the RFIO daemon.
57
58       See NOTES section below.
59
60[1mRETURN VALUE[0m
61       This  routine  returns  0  if the operation was successful
62or ‐1 if the
63       operation failed. In the latter case, [1mserrno [22mis set
64appropriately.
65
66[1mNOTES[0m
67       Multiple   connections   using  rfio_munlink  are  thread‐
68safe  but   not
69       process‐wide,  therefore  a   forked   child   cann  share
70file descriptors
71       opened  with rfio_munlink by its parent. Use [1mrfio_msym‐
72link_reset [22min such
73       case.
74
75       Multiple  connections  behaviour   is   undefined  if  you
76work in a multi‐
77       threaded environment and with  threads  [1mnot  [22mcreat‐
78ed  using  the  LCG’s
79       [1mCthread [22minterface.
80
81[1mERRORS[0m
82       [1mEPERM        [4m[22mpath[24m is a directory.
83
84       [1mENOENT       [22mThe named file does not exist or is  a
85null pathname.
86
87       [1mEACCES        [22mSearch   permission  is  denied  on a
88component of the [4mpath[0m
89                    prefix or write permission is denied  on  the
90parent  direc‐
91                    tory or the parent has the sticky bit S_ISVTX
92set and
93
94                      the  effective  user  ID of  the  requestor
95does not match
96                      the owner ID of the file and
97
98                      the  effective  user  ID  of  the requestor
99does  not  match
100                      the owner ID of the directory and
101
102                      the file is not writable by  the  requestor
103and
104
105                      the requestor is not super‐user.
106
107       [1mEFAULT       [4m[22mpath[24m is a NULL pointer.
108
109       [1mENOTDIR       [22mA  component of [4mpath[24m prefix is
110not a directory.
111
112       [1mENAMETOOLONG [22mThe   length  of  [4mpath[24m  exceeds
113[1mCA_MAXPATHLEN [22mor the length of
114                    a  [4mpath[24m  component  exceeds [1mCA_MAX‐
115NAMELEN[22m.
116
117       [1mSENOSHOST    [22mHost unknown.
118
119       [1mSENOSSERV    [22mService unknown.
120
121       [1mSECOMERR     [22mCommunication error.
122
123[1mSEE ALSO[0m
124       [1mCastor_limits(4)[22m,    [1mrfio_rmdir(3)[22m,    [1mC‐
125thread(3)[0m
126
127[1mAUTHOR[0m
128       [1mLCG Grid Deployment [22mTeam
129
130
131
132LCG                         $Date:    2005/03/31    13:13:04    $
133RFIO_UNLINK(3)
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
Impressum