Skip to content

Commit 48b9ac6

Browse files
devopen: trap SIGINT when running elinks
1 parent 6b3026f commit 48b9ac6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

bin/devopen.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import argparse
44
from json import load
55
from pathlib import Path
6+
import signal
67
from subprocess import call, check_output
78
from sys import argv, stderr
89

@@ -22,7 +23,9 @@ def get_item(items):
2223
except: return None
2324

2425
def open_url(url):
26+
h = signal.signal(signal.SIGINT, signal.SIG_IGN)
2527
call(www + [ url ])
28+
signal.signal(signal.SIGINT, h)
2629

2730
def find_doc(name):
2831
for doc in local:

0 commit comments

Comments
 (0)