unix_bind (FUN)ΒΆ

FUNCTION unix_bind : INT

bind a pathname to a unix domain socket see manpage bind.

The ownergroup of the created socketfile can be set to the default group codesysuser with USE_CODESYSGROUP. If placed in the default path /var/run/codesysextension/ this will have no effect, since the SIGD bit is set for this folder.

The permissions of the created socketfile can be set to 600, 660, 666, depending on the used permission flag. Use only one of these: PERMISSION_OWNER will set the filepermission to 600. PERMISSION_OWNER_GROUP will set the filepermission to 660. PERMISSION_EVERYONE will set the filepermission to 666. No combination of the permission flags are possible, but it is possible to set one of the filepermissions and the ownergroup.

Returnvalue: On success, zero is returned. On error, -1 is returned, and errno is set to indicate the error.

InOut:

Scope

Name

Type

Return

unix_bind

INT

Input

sockfd

INT

pathname

STRING(108)

mode

BYTE