[OpenIndiana-discuss] Python abstact socket and config printer applet.py

Joshua M. Clulow josh at sysmgr.org
Thu Dec 14 00:17:13 UTC 2023


On Wed, 13 Dec 2023 at 15:08, Bill Sommerfeld via openindiana-discuss
<openindiana-discuss at openindiana.org> wrote:
> A quick look at the applet.py code shows that it creates the bound
> socket as a lock (to prevent multiple instances from running as the same
> user) but never uses it for anything or passes it to anything outside
> the "__main__" block.
>
> So there's no need to prevent connections - the daemon will never call
> sock.accept()

Could it not just create a file in /tmp and flock it then?  The socket
business seems a touch circuitous...

-- 
Joshua M. Clulow
http://blog.sysmgr.org



More information about the openindiana-discuss mailing list