RFIO_UNLINK(3) | Rfio Library Functions | RFIO_UNLINK(3) |
rfio_unlink - remove a file entry
#include <sys/types.h>
#include "rfio_api.h"
int rfio_unlink (const char *path);
int rfio_munlink (const char *path);
int rfio_munlink_reset ();
int rfio_unend ();
rfio_unlink removes a file entry.
rfio_munlink is identical to rfio_unlink but keeps the connection open to the server unless there are more than MAXMCON connections already opened. This is useful when issuing a series of unlink calls. The last rfio_munlink call should be followed by a call to rfio_unend.
rfio_munlink_reset is to be used when your program is forking. In such a case the permanent connections opened with rfio_munlink become shared between the parent and the child. Use rfio_munlink_reset to perform the necessary reset and close of the socket file descriptor in the parent or the child in order to be sure that only of them will receice an answer from the RFIO daemon.
rfio_munlink_reset is to be used when your program is forking. In such a case the permanent connections opened with rfio_munlink become shared between the parent and the child. Use rfio_munlink_reset to perform the necessary reset and close of the socket file descriptor in the parent or the child in order to be sure that only of them will receice an answer from the RFIO daemon.
See NOTES section below.
This routine returns 0 if the operation was successful or -1 if the operation failed. In the latter case, serrno is set appropriately.
Multiple connections using rfio_munlink are thread-safe but not process-wide, therefore a forked child cann share file descriptors opened with rfio_munlink by its parent. Use rfio_msymlink_reset in such case.
Multiple connections behaviour is undefined if you work in a multi-threaded environment and with threads not created using the LCG's Cthread interface.
the effective user ID of the requestor does not match the owner ID of the file and
the effective user ID of the requestor does not match the owner ID of the directory and
the file is not writable by the requestor and
the requestor is not super-user.
LCG Grid Deployment Team
$Date: 2005/03/31 13:13:04 $ | LCG |