Socket Lock File?

Is it possible to block a socket for a stream? For example, using flock?

These locks are intended for files, but they take a common file descriptor as a parameter.

+4
source share
1 answer

The documentation specifically states that the pack is for files. On the MacOS documentation page (person): (in italics)

Flock () applies or removes advisory file locking associated with the fd file descriptor.

, . , , pthread_mutex_lock/unlock. ( -, ).

, ,

+4

All Articles