rfio_symlink man page

RFIO_SYMLINK(3) Rfio Library Functions RFIO_SYMLINK(3)

rfio_symlink - create a symbolic link to a file

[1m#include <sys/types.h>[0m
[1m#include "rfio_api.h"[0m

[1mint rfio_symlink (const char *[4m[22moldpath[24m[1m, const char *[4m[22mnewpath[24m[1m);[0m
[1mint rfio_msymlink (const char *[4m[22moldpath[24m[1m, const char *[4m[22mnewpath[24m[1m);[0m
[1mint rfio_msymlink_reset ();[0m
[1mint rfio_symend ();[0m

[1mrfio_symlink [22mcreates a symbolic link [4mnewpath[24m which contains the string

[4mnewpath[24m may point to a non existing file.
If [4mnewpath[24m exists already, it will not be overwritten.
Write permission is required on [4mnewpath[24m parent.

[1mrfio_msymlink [22mis identical to [1mrfio_symlink [22mbut keeps the connection
open to the server unless there are more than MAXMCON connections
already opened. This is useful when issuing a series of symlink calls.
The last [1mrfio_msymlink [22mcall should be followed by a call to

[1mrfio_msymlink_reset [22mis to be used when your program is forking. In such
a case the permanent connections opened with [1mrfio_msymlink [22mbecome
shared between the parent and the child. Use [1mrfio_msymlink_reset [22mto
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, [1mserrno [22mis set appropriately.

Multiple connections using rfio_msymlink are thread-safe but not
process-wide, therefore a forked child can share file descriptors
opened with rfio_msymlink by its parent. Use [1mrfio_msymlink_reset [22min
such case.

Multiple connections behaviour is undefined if you work in a multi-
threaded environment and with threads [1mnot [22mcreated using the LCG's
[1mCthread [22minterface.

[1mENOENT [22mA component of [4mnewpath[24m prefix does not exist or [4moldpath[24m is
a null pathname.

[1mENOMEM [22mInsufficient memory.

[1mEACCES [22mSearch permission is denied on a component of the [4mnewpath[0m
prefix or write permission on the [4mnewpath[24m parent directory
is denied.

[1mEFAULT [4m[22moldpath[24m or [4mnewpath[24m is a NULL pointer.

[1mEEXIST [4m[22mnewpath[24m already exists.

[1mENOTDIR [22mA component of the [4mnewpath[24m prefix is not a directory.

[1mENAMETOOLONG [22mThe length of [4moldpath[24m or [4mnewpath[24m exceeds [1mCA_MAXPATHLEN [22mor
the length of a path component exceeds [1mCA_MAXNAMELEN[22m.

[1mSENOSHOST [22mHost unknown.

[1mSENOSSERV [22mService unknown.

[1mSECOMERR [22mCommunication error.

[1mSEOPNOTSUP [22mNot supported on Windows.

[1mSEE ALSO[0m
[1mCastor_limits(4)[22m, [1mrfio_readlink(3)[22m, [1mrfio_unlink(3)[22m, [1mCthread(3)[0m

[1mLCG Grid Deployment [22mTeam

LCG $Date: 2005/03/31 13:13:03 $ RFIO_SYMLINK(3)

Referenced By

rfio_msymlink(3) is an alias of rfio_symlink(3).