added non-blocking input (linux only, and discouraged)