title: How can I determine if my process is being run interactively?
body: <p>Is there a standard(ish) POSIX way of determining if my process (I’m writing this as a Ruby script right now; but I’m curious for multiple environments, including Node.js and ISO C command-line applications) is being run in an interactive terminal, as opposed to, say, cron, or execution from another tool, or… so on and so forth.</p>
  
  <p>Specifically, I need to acquire user input in certain situations, and I need to fail fatally if that is determinably <em>not possible</em> (i.e. being run by cron.) I can do this with an environment variable, but I’d prefer something more standard-ish, if I can.</p>