Skip to content

host sensors: preserve serial report input in the timeout fallback - #1169

Merged
dormancygrace merged 2 commits into
mainfrom
audit-dec/sensor-stdin
Dec 2, 2026
Merged

dormancygrace merged 2 commits into
mainfrom
audit-dec/sensor-stdin

Conversation

@dormancygrace

@dormancygrace dormancygrace commented Dec 2, 2026 •

Copy link
Copy Markdown
Owner

Preserve the pipeline input when the Linux serial sensor helper runs dd in the background. Without timeout(1), a non-interactive shell supplied EOF and an empty report appeared successful.

Verified the actual limit function under dash with and without timeout(1). Both paths delivered the same bytes, propagated exit status 7 and stopped a sleeping command at its deadline.

Final verification

The saved input descriptor now exists only while the fallback starts the reader. A closed standard input works in both branches, and the watchdog has its own standard streams. Under dash, Bash and BusyBox ash, both paths copied 409,600 bytes exactly, propagated status 7, terminated a sleeping command at the deadline and gave the child no extra fd 3. With a 300,000-byte producer and an early-exiting reader the pipeline returned before the five-second watchdog.

@github-actions

github-actions Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Build outputs

Compared with the build of main at 6de2720.

All 722 outputs are identical.
Hashes: outputs-sha256 artifact of this run.

@dormancygrace dormancygrace left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The saved input descriptor now exists only while the fallback starts the reader. A closed standard input works in both branches, and the watchdog has its own standard streams. Under dash, Bash and BusyBox ash, both paths copied 409,600 bytes exactly, propagated status 7, terminated a sleeping command at the deadline and gave the child no extra fd 3. With a 300,000-byte producer and an early-exiting reader the pipeline returned before the five-second watchdog. No remaining blockers.

@dormancygrace
dormancygrace merged commit 1e247af into main Dec 2, 2026
16 checks passed
@dormancygrace
dormancygrace deleted the audit-dec/sensor-stdin branch December 2, 2026 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant