diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2025-11-17 23:16:55 -0800 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2025-11-17 23:16:55 -0800 |
| commit | f39b6c468c52745dbca9a842d91c8373fda208ab (patch) | |
| tree | 67321e90bba55fcc0f3a05f3bd9abad449b2c030 /scripts/kconfig/tests/conftest.py | |
| parent | e08969c4d65ac31297fcb4d31d4808c789152f68 (diff) | |
| parent | 6a23ae0a96a600d1d12557add110e0bb6e32730c (diff) | |
Merge tag 'v6.18-rc6' into for-linus
Sync up with the mainline to bring in definition of
INPUT_PROP_HAPTIC_TOUCHPAD.
Diffstat (limited to 'scripts/kconfig/tests/conftest.py')
| -rw-r--r-- | scripts/kconfig/tests/conftest.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/scripts/kconfig/tests/conftest.py b/scripts/kconfig/tests/conftest.py index 2a2a7e2da060..d94b79e012c0 100644 --- a/scripts/kconfig/tests/conftest.py +++ b/scripts/kconfig/tests/conftest.py @@ -81,7 +81,22 @@ class Conf: # For interactive modes such as oldaskconfig, oldconfig, # send 'Enter' key until the program finishes. if interactive: - ps.stdin.write(b'\n') + try: + ps.stdin.write(b'\n') + ps.stdin.flush() + except (BrokenPipeError, OSError): + # Process has exited, stop sending input + break + + # Close stdin gracefully + try: + ps.stdin.close() + except (BrokenPipeError, OSError): + # Ignore broken pipe on close + pass + + # Wait for process to complete + ps.wait() self.retcode = ps.returncode self.stdout = ps.stdout.read().decode() |
