mirror of
https://github.com/geohot/qira
synced 2024-12-26 05:56:57 +03:00
Merge pull request #222 from cromize/master
fix socat init print format
This commit is contained in:
commit
b349141547
@ -26,20 +26,20 @@ def start_bindserver(program, port, parent_id, start_cl, loop = False):
|
|||||||
|
|
||||||
if os.fork() != 0:
|
if os.fork() != 0:
|
||||||
return
|
return
|
||||||
|
print("**** socat listening on %s:%s" % myss.getsockname())
|
||||||
|
|
||||||
# bindserver runs in a fork
|
# bindserver runs in a fork
|
||||||
while 1:
|
while 1:
|
||||||
print("**** listening on",myss)
|
|
||||||
(cs, address) = myss.accept()
|
(cs, address) = myss.accept()
|
||||||
|
|
||||||
# fork off the child if we are looping
|
# fork off the child if we are looping
|
||||||
if loop:
|
if loop:
|
||||||
if os.fork() != 0:
|
if os.fork() != 0:
|
||||||
cs.close()
|
cs.close()
|
||||||
continue
|
continue
|
||||||
run_id = get_next_run_id()
|
run_id = get_next_run_id()
|
||||||
print("**** ID",run_id,"CLIENT",cs, address, cs.fileno())
|
|
||||||
|
|
||||||
fd = cs.fileno()
|
fd = cs.fileno()
|
||||||
|
print("**** ID %s CLIENT %s:%s fd: %s" % (run_id, address[0], address[1], fd))
|
||||||
|
|
||||||
# python nonblocking is a lie...
|
# python nonblocking is a lie...
|
||||||
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
|
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user