In a symlink pointing to '127.0.1.1:+xxxxx', what is the plus character for?

Symbolic links which don't point to a file have no generic meaning at all. In this case it might be the process ID, or a port with some special protocol spoken over it, or another identifier. It all depends on what program made it.

Software which creates these links simply takes advantage of the facts that 1) a symlink's target may be non-existent or even total nonsense; 2) creating a symlink is a single-syscall completely atomic operation (as is reading its target), unlike creating a regular file which takes at least 3 separate system calls.

Thus symlink creation can be abused as a way of locking (ensuring single instance of a program) even when other mechanisms may be unreliable. The program doesn't need the symlink to actually resolve to a real file: it only cares about whether creating the link succeeds, or whether it fails due to it already existing.


As far as I know the "+" means that the number after the IP (the "xxxxx") refers to a "process ID" (not a port which usually uses the notation [IP-address]:[portnumber]).

It is possible that this "notation" (not sure I would call it a "notation" since I don't know of any "official" documentation) refers to something else if used by a specific application - but then again, that's always the possibility not only with symlinks. The only cases I know of (and could find with a search that wasn't too extensive) the "+XXXX" always refered to the process ID.