Jump to content
Not connected, Your IP: 3.141.41.187
Sign in to follow this  
SENKOU

/tmp/ gets polluted with .pid files when using SSL tunnel

Recommended Posts

Every connection makes a new one, but they're not cleaned up when disconnecting. If you have screwy internet it gets pretty annoying looking for files in /tmp/, especially since the file names start with a random hash so they're not clumped together when sorting alphabetically.

​You can see where the client tells stunnel to make them here: https://github.com/AirVPN/airvpn-client/blob/83eae96b08c6e3147cc24c71db25cd0975ba9e64/src/Core/Threads/Session.cs#L635

​I don't know how it uses the file though.

​Possible solutions:

​- make the files in a /tmp/airvpn/ directory instead of /tmp/

​- cleanup the files when they're not needed anymore (presumably when disconnecting)

Share this post


Link to post
Guest

Hmm yeah I can see that but I would think they are under the assumption that you clean your temp once in a while, a reboot usually accomplish this too

Share this post


Link to post

Many *nix daemons create .pid files in order to lock the current proccess and avoid

possible race conditions if more than one is started. Notable ones are Apache/Nginx, MySQL, PHP.

Stunnel uses the same ports for itself and works similar so it implemets the same approach.

 

I am not saying this couldn't be moved to /tmp/air or gathered in a single direction, but note that

not all systems have write permissions and some systems run with SELinux which might prevent

creating certain things.

May I know why these files annoy you so much? They are zero sized so there is no disk bloat, and

like EdensSpire said they are removed after a system reboot or if you manually choose to do so.

The /tmp directory is a place for temporary "garbage", so don't expect it to be as tidy as others.


Occasional moderator, sometimes BOFH. Opinions are my own, except when my wife disagrees.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Security Check
    Play CAPTCHA Audio
    Refresh Image
Sign in to follow this  

×
×
  • Create New...