Saturday, April 20, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 3547  / 3 Years ago, mon, july 26, 2021, 3:15:06
lsof -i :80
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
gnome-pan 28597 murat 18u IPv4 2907888 0t0 TCP ....
gnome-pan 28597 murat 19u IPv4 2907903 0t0 TCP ....
dropbox 28624 murat 18u IPv4 2755213 0t0 TCP ...


When i list open files with -i switch i found out that some processes have the same fd's.For example above output, 28597 and 28624 pid's have the same fd's.That means these process can reach the same memory space.What is the reason for this ? How can they reach the same area and why ? Also what's the meaning of u (18u) ? Some fd's are end up with w.


More From » programming

 Answers
5

That means these process can reach the same memory space.




Why would they want to reach a common memory space? The answer's simple -- to talk to each other!



In your case, dropbox is talking to gnome-panel, which provides the Dropbox status icon.



The libc manual has this to say:




The major use of duplicating a file descriptor is to implement redirection of input or output: that is, to change the file or pipe that a particular file descriptor corresponds to.




The u flag simply means that the FD is read-write; w means write-only, r means read-only.


[#37123] Tuesday, July 27, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
rtbrbab

Total Points: 461
Total Questions: 126
Total Answers: 117

Location: Saudi Arabia
Member since Fri, Jul 1, 2022
2 Years ago
rtbrbab questions
Fri, May 5, 23, 14:22, 1 Year ago
Tue, Nov 16, 21, 14:41, 2 Years ago
Thu, Mar 23, 23, 20:47, 1 Year ago
Sat, Jun 18, 22, 21:36, 2 Years ago
;