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

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
48
down vote

favorite
11












On my Linux filesystem, a symlink points to 127.0.1.1:+xxxxx.



Why the plus sign? Could there also be a minus? Why not just 127.0.1.1:xxxxx?










share|improve this question









New contributor




myMethod is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • Is this symbolic link under /proc?
    – Joshua
    Oct 3 at 22:15






  • 4




    @Joshua: More likely under ~/.mozilla/ or similar. Firefox/Thunderbird, and iirc Steam, use such symlinks for locking.
    – grawity
    Oct 4 at 4:05






  • 2




    Is xxxxx a number, or the characters xxxxx?
    – Mawg
    2 days ago






  • 2




    Probably unrelated but just for information. In some IRC clients the plus-sign before the port was there to indicate the remote server uses SSL/TLS.
    – eKKiM
    2 days ago














up vote
48
down vote

favorite
11












On my Linux filesystem, a symlink points to 127.0.1.1:+xxxxx.



Why the plus sign? Could there also be a minus? Why not just 127.0.1.1:xxxxx?










share|improve this question









New contributor




myMethod is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • Is this symbolic link under /proc?
    – Joshua
    Oct 3 at 22:15






  • 4




    @Joshua: More likely under ~/.mozilla/ or similar. Firefox/Thunderbird, and iirc Steam, use such symlinks for locking.
    – grawity
    Oct 4 at 4:05






  • 2




    Is xxxxx a number, or the characters xxxxx?
    – Mawg
    2 days ago






  • 2




    Probably unrelated but just for information. In some IRC clients the plus-sign before the port was there to indicate the remote server uses SSL/TLS.
    – eKKiM
    2 days ago












up vote
48
down vote

favorite
11









up vote
48
down vote

favorite
11






11





On my Linux filesystem, a symlink points to 127.0.1.1:+xxxxx.



Why the plus sign? Could there also be a minus? Why not just 127.0.1.1:xxxxx?










share|improve this question









New contributor




myMethod is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











On my Linux filesystem, a symlink points to 127.0.1.1:+xxxxx.



Why the plus sign? Could there also be a minus? Why not just 127.0.1.1:xxxxx?







linux networking filesystems symbolic-link ip-address






share|improve this question









New contributor




myMethod is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




myMethod is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited Oct 4 at 4:20









Scott

15k113788




15k113788






New contributor




myMethod is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Oct 3 at 19:01









myMethod

34924




34924




New contributor




myMethod is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





myMethod is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






myMethod is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











  • Is this symbolic link under /proc?
    – Joshua
    Oct 3 at 22:15






  • 4




    @Joshua: More likely under ~/.mozilla/ or similar. Firefox/Thunderbird, and iirc Steam, use such symlinks for locking.
    – grawity
    Oct 4 at 4:05






  • 2




    Is xxxxx a number, or the characters xxxxx?
    – Mawg
    2 days ago






  • 2




    Probably unrelated but just for information. In some IRC clients the plus-sign before the port was there to indicate the remote server uses SSL/TLS.
    – eKKiM
    2 days ago
















  • Is this symbolic link under /proc?
    – Joshua
    Oct 3 at 22:15






  • 4




    @Joshua: More likely under ~/.mozilla/ or similar. Firefox/Thunderbird, and iirc Steam, use such symlinks for locking.
    – grawity
    Oct 4 at 4:05






  • 2




    Is xxxxx a number, or the characters xxxxx?
    – Mawg
    2 days ago






  • 2




    Probably unrelated but just for information. In some IRC clients the plus-sign before the port was there to indicate the remote server uses SSL/TLS.
    – eKKiM
    2 days ago















Is this symbolic link under /proc?
– Joshua
Oct 3 at 22:15




Is this symbolic link under /proc?
– Joshua
Oct 3 at 22:15




4




4




@Joshua: More likely under ~/.mozilla/ or similar. Firefox/Thunderbird, and iirc Steam, use such symlinks for locking.
– grawity
Oct 4 at 4:05




@Joshua: More likely under ~/.mozilla/ or similar. Firefox/Thunderbird, and iirc Steam, use such symlinks for locking.
– grawity
Oct 4 at 4:05




2




2




Is xxxxx a number, or the characters xxxxx?
– Mawg
2 days ago




Is xxxxx a number, or the characters xxxxx?
– Mawg
2 days ago




2




2




Probably unrelated but just for information. In some IRC clients the plus-sign before the port was there to indicate the remote server uses SSL/TLS.
– eKKiM
2 days ago




Probably unrelated but just for information. In some IRC clients the plus-sign before the port was there to indicate the remote server uses SSL/TLS.
– eKKiM
2 days ago










2 Answers
2






active

oldest

votes

















up vote
89
down vote



accepted










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.






share|improve this answer
















  • 5




    "* unlike creating a regular file which takes at least 3 separate system calls.*" -- Could you clarify? Do you mean fopen, fwrite, and fclose?
    – Nic Hartley
    Oct 4 at 19:21






  • 9




    @NicHartley: The system calls are open (or maybe creat in old software), write, and close, not the f* versions that stdio provides. But, yes, you need to do at least open and write to create the file and put something meaningful into it. Now if you want some code to "try to create it, if successful, put some information into it, else, read some information from it", the second process could just try its read before the first process has a chance to write. symlink avoids that; either succeed and create the link, or fail and be sure readlink has the information for you.
    – Guntram Blohm
    Oct 4 at 19:50

















up vote
21
down vote













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.






share|improve this answer






















  • I just checked it. In my case it really does.
    – myMethod
    Oct 3 at 19:27






  • 1




    Is there documentation of this format somewhere that you could link to?
    – David Z
    Oct 3 at 20:31






  • 1




    Not sure, I just remember it from hands on experience.
    – Albin
    Oct 3 at 20:55






  • 2




    It sounds like you're talking about a symlink in a special directory, like /proc or /dev. Can you explain what this symlink is used for?
    – Barmar
    Oct 4 at 1:48






  • 4




    This is the first time I've seen this notation at all, so I'm surprised to hear you say that it's a general notation. Where have you seen it used to mean a process ID?
    – Barmar
    Oct 4 at 15:24










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "3"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);






myMethod is a new contributor. Be nice, and check out our Code of Conduct.









 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1363677%2fin-a-symlink-pointing-to-127-0-1-1xxxxx-what-is-the-plus-character-for%23new-answer', 'question_page');

);

Post as a guest






























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
89
down vote



accepted










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.






share|improve this answer
















  • 5




    "* unlike creating a regular file which takes at least 3 separate system calls.*" -- Could you clarify? Do you mean fopen, fwrite, and fclose?
    – Nic Hartley
    Oct 4 at 19:21






  • 9




    @NicHartley: The system calls are open (or maybe creat in old software), write, and close, not the f* versions that stdio provides. But, yes, you need to do at least open and write to create the file and put something meaningful into it. Now if you want some code to "try to create it, if successful, put some information into it, else, read some information from it", the second process could just try its read before the first process has a chance to write. symlink avoids that; either succeed and create the link, or fail and be sure readlink has the information for you.
    – Guntram Blohm
    Oct 4 at 19:50














up vote
89
down vote



accepted










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.






share|improve this answer
















  • 5




    "* unlike creating a regular file which takes at least 3 separate system calls.*" -- Could you clarify? Do you mean fopen, fwrite, and fclose?
    – Nic Hartley
    Oct 4 at 19:21






  • 9




    @NicHartley: The system calls are open (or maybe creat in old software), write, and close, not the f* versions that stdio provides. But, yes, you need to do at least open and write to create the file and put something meaningful into it. Now if you want some code to "try to create it, if successful, put some information into it, else, read some information from it", the second process could just try its read before the first process has a chance to write. symlink avoids that; either succeed and create the link, or fail and be sure readlink has the information for you.
    – Guntram Blohm
    Oct 4 at 19:50












up vote
89
down vote



accepted







up vote
89
down vote



accepted






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.






share|improve this answer












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.







share|improve this answer












share|improve this answer



share|improve this answer










answered Oct 3 at 19:19









grawity

220k33451515




220k33451515







  • 5




    "* unlike creating a regular file which takes at least 3 separate system calls.*" -- Could you clarify? Do you mean fopen, fwrite, and fclose?
    – Nic Hartley
    Oct 4 at 19:21






  • 9




    @NicHartley: The system calls are open (or maybe creat in old software), write, and close, not the f* versions that stdio provides. But, yes, you need to do at least open and write to create the file and put something meaningful into it. Now if you want some code to "try to create it, if successful, put some information into it, else, read some information from it", the second process could just try its read before the first process has a chance to write. symlink avoids that; either succeed and create the link, or fail and be sure readlink has the information for you.
    – Guntram Blohm
    Oct 4 at 19:50












  • 5




    "* unlike creating a regular file which takes at least 3 separate system calls.*" -- Could you clarify? Do you mean fopen, fwrite, and fclose?
    – Nic Hartley
    Oct 4 at 19:21






  • 9




    @NicHartley: The system calls are open (or maybe creat in old software), write, and close, not the f* versions that stdio provides. But, yes, you need to do at least open and write to create the file and put something meaningful into it. Now if you want some code to "try to create it, if successful, put some information into it, else, read some information from it", the second process could just try its read before the first process has a chance to write. symlink avoids that; either succeed and create the link, or fail and be sure readlink has the information for you.
    – Guntram Blohm
    Oct 4 at 19:50







5




5




"* unlike creating a regular file which takes at least 3 separate system calls.*" -- Could you clarify? Do you mean fopen, fwrite, and fclose?
– Nic Hartley
Oct 4 at 19:21




"* unlike creating a regular file which takes at least 3 separate system calls.*" -- Could you clarify? Do you mean fopen, fwrite, and fclose?
– Nic Hartley
Oct 4 at 19:21




9




9




@NicHartley: The system calls are open (or maybe creat in old software), write, and close, not the f* versions that stdio provides. But, yes, you need to do at least open and write to create the file and put something meaningful into it. Now if you want some code to "try to create it, if successful, put some information into it, else, read some information from it", the second process could just try its read before the first process has a chance to write. symlink avoids that; either succeed and create the link, or fail and be sure readlink has the information for you.
– Guntram Blohm
Oct 4 at 19:50




@NicHartley: The system calls are open (or maybe creat in old software), write, and close, not the f* versions that stdio provides. But, yes, you need to do at least open and write to create the file and put something meaningful into it. Now if you want some code to "try to create it, if successful, put some information into it, else, read some information from it", the second process could just try its read before the first process has a chance to write. symlink avoids that; either succeed and create the link, or fail and be sure readlink has the information for you.
– Guntram Blohm
Oct 4 at 19:50












up vote
21
down vote













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.






share|improve this answer






















  • I just checked it. In my case it really does.
    – myMethod
    Oct 3 at 19:27






  • 1




    Is there documentation of this format somewhere that you could link to?
    – David Z
    Oct 3 at 20:31






  • 1




    Not sure, I just remember it from hands on experience.
    – Albin
    Oct 3 at 20:55






  • 2




    It sounds like you're talking about a symlink in a special directory, like /proc or /dev. Can you explain what this symlink is used for?
    – Barmar
    Oct 4 at 1:48






  • 4




    This is the first time I've seen this notation at all, so I'm surprised to hear you say that it's a general notation. Where have you seen it used to mean a process ID?
    – Barmar
    Oct 4 at 15:24














up vote
21
down vote













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.






share|improve this answer






















  • I just checked it. In my case it really does.
    – myMethod
    Oct 3 at 19:27






  • 1




    Is there documentation of this format somewhere that you could link to?
    – David Z
    Oct 3 at 20:31






  • 1




    Not sure, I just remember it from hands on experience.
    – Albin
    Oct 3 at 20:55






  • 2




    It sounds like you're talking about a symlink in a special directory, like /proc or /dev. Can you explain what this symlink is used for?
    – Barmar
    Oct 4 at 1:48






  • 4




    This is the first time I've seen this notation at all, so I'm surprised to hear you say that it's a general notation. Where have you seen it used to mean a process ID?
    – Barmar
    Oct 4 at 15:24












up vote
21
down vote










up vote
21
down vote









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.






share|improve this answer














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.







share|improve this answer














share|improve this answer



share|improve this answer








edited 2 days ago

























answered Oct 3 at 19:12









Albin

1,473623




1,473623











  • I just checked it. In my case it really does.
    – myMethod
    Oct 3 at 19:27






  • 1




    Is there documentation of this format somewhere that you could link to?
    – David Z
    Oct 3 at 20:31






  • 1




    Not sure, I just remember it from hands on experience.
    – Albin
    Oct 3 at 20:55






  • 2




    It sounds like you're talking about a symlink in a special directory, like /proc or /dev. Can you explain what this symlink is used for?
    – Barmar
    Oct 4 at 1:48






  • 4




    This is the first time I've seen this notation at all, so I'm surprised to hear you say that it's a general notation. Where have you seen it used to mean a process ID?
    – Barmar
    Oct 4 at 15:24
















  • I just checked it. In my case it really does.
    – myMethod
    Oct 3 at 19:27






  • 1




    Is there documentation of this format somewhere that you could link to?
    – David Z
    Oct 3 at 20:31






  • 1




    Not sure, I just remember it from hands on experience.
    – Albin
    Oct 3 at 20:55






  • 2




    It sounds like you're talking about a symlink in a special directory, like /proc or /dev. Can you explain what this symlink is used for?
    – Barmar
    Oct 4 at 1:48






  • 4




    This is the first time I've seen this notation at all, so I'm surprised to hear you say that it's a general notation. Where have you seen it used to mean a process ID?
    – Barmar
    Oct 4 at 15:24















I just checked it. In my case it really does.
– myMethod
Oct 3 at 19:27




I just checked it. In my case it really does.
– myMethod
Oct 3 at 19:27




1




1




Is there documentation of this format somewhere that you could link to?
– David Z
Oct 3 at 20:31




Is there documentation of this format somewhere that you could link to?
– David Z
Oct 3 at 20:31




1




1




Not sure, I just remember it from hands on experience.
– Albin
Oct 3 at 20:55




Not sure, I just remember it from hands on experience.
– Albin
Oct 3 at 20:55




2




2




It sounds like you're talking about a symlink in a special directory, like /proc or /dev. Can you explain what this symlink is used for?
– Barmar
Oct 4 at 1:48




It sounds like you're talking about a symlink in a special directory, like /proc or /dev. Can you explain what this symlink is used for?
– Barmar
Oct 4 at 1:48




4




4




This is the first time I've seen this notation at all, so I'm surprised to hear you say that it's a general notation. Where have you seen it used to mean a process ID?
– Barmar
Oct 4 at 15:24




This is the first time I've seen this notation at all, so I'm surprised to hear you say that it's a general notation. Where have you seen it used to mean a process ID?
– Barmar
Oct 4 at 15:24










myMethod is a new contributor. Be nice, and check out our Code of Conduct.









 

draft saved


draft discarded


















myMethod is a new contributor. Be nice, and check out our Code of Conduct.












myMethod is a new contributor. Be nice, and check out our Code of Conduct.











myMethod is a new contributor. Be nice, and check out our Code of Conduct.













 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1363677%2fin-a-symlink-pointing-to-127-0-1-1xxxxx-what-is-the-plus-character-for%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

Peggy Mitchell

Palaiologos

The Forum (Inglewood, California)