Skip to content

Commit

Permalink
smtpd: remove input() hack
Browse files Browse the repository at this point in the history
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
  • Loading branch information
kvalo committed Feb 25, 2024
1 parent 5d4a07b commit 2841dd9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion stubs/cmdtests/smtpd.script
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def main():
env['STUB_SMTPD_DATADIR'] = smtpddir

smtpd = subprocess.Popen([os.path.join(stubdir, 'smtpd'), '--port=4321'],
env=env)
stdin=subprocess.DEVNULL, env=env)

time.sleep(1)

Expand Down
6 changes: 4 additions & 2 deletions stubs/smtpd
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import aiosmtpd.controller
import os
import os.path
import sys
import signal

datadir = None

Expand Down Expand Up @@ -81,8 +82,9 @@ def run(args):
# Run the event loop in a separate thread.
controller.start()

# Wait for the user to press Return.
input()
# wait until a signal is received
signal.pause()

controller.stop()


Expand Down

0 comments on commit 2841dd9

Please sign in to comment.