summaryrefslogtreecommitdiff
path: root/tests/end2end/data/userscripts/stdinclose.py
blob: b4ea5d7b5d86628c50c15489acc6eb5d2b14c12c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env python3

# Copyright 2017-2021 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later

"""A userscript to check if the stdin gets closed."""

import sys
import os
sys.stdin.read()
with open(os.environ['QUTE_FIFO'], 'wb') as fifo:
    fifo.write(b':message-info "stdin closed"\n')