Fix committed.
Tested with the open_with plugin on windows.
Tested with the following snippet (calibre-debug -e) on both windows and linux. Not tested on macs.
import socket from calibre.utils.socket_inheritance import set_socket_inherit from calibre.utils.socket_inheritance import get_socket_inherit
socket = socket.socket() print get_socket_inherit(socket) set_socket_inherit(socket, False) print get_socket_inherit(socket) set_socket_inherit(socket, True) print get_socket_inherit(socket)
FWIW: the code provided in that link is wrong. It inverted the sense of the inherit flag on windows.
Fix committed.
Tested with the open_with plugin on windows.
Tested with the following snippet (calibre-debug -e) on both windows and linux. Not tested on macs.
import socket utils.socket_ inheritance import set_socket_inherit utils.socket_ inheritance import get_socket_inherit
from calibre.
from calibre.
socket = socket.socket() inherit( socket) inherit( socket, False) inherit( socket) inherit( socket, True) inherit( socket)
print get_socket_
set_socket_
print get_socket_
set_socket_
print get_socket_
FWIW: the code provided in that link is wrong. It inverted the sense of the inherit flag on windows.