200>/var/lock/mylockfile
This creates a file /var/lock/mylockfile
which can be written to via file descriptor 200 inside the sub-shell. The number 200 is an arbitrary one. Picking a high number reduces the chance of any of the commands inside the sub-shell "noticing" the extra file descriptor.
(Typically, file descriptors 0, 1, and 2 are used by stdin, stdout, and stderr, respectively. This number could have been as low as 3.)
flock -s 200
Then flock
is used to lock the file via the previously created file descriptor. It needs write access to the file, which the >
in 200>
provided. Note that this happens after the redirection above.