Skip to content

Instantly share code, notes, and snippets.

View notweerdmonk's full-sized avatar

notweerdmonk

View GitHub Profile
@notweerdmonk
notweerdmonk / ptytest.c
Last active January 30, 2026 17:56
Open a pseudoterminal master device and set it up. Demonstrate software flow control and detection of opening of slave device by another process.
/*
* Copyright (c) 2025 notweerdmonk
*
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*