Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Standard streams
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Background== In most operating systems predating [[Unix]], programs had to explicitly connect to the appropriate input and output devices. OS-specific intricacies caused this to be a tedious programming task. On many systems it was necessary to obtain control of environment settings, access a local file table, determine the intended data set, and handle hardware correctly in the case of a [[punch card reader]], [[magnetic tape drive]], [[disk drive]], [[line printer]], card punch, or interactive terminal. One of Unix's several groundbreaking advances was ''abstract devices'', which removed the need for a program to know or care what kind of devices it was communicating with{{citation needed|date=December 2013}}. Older operating systems forced upon the programmer a record structure and frequently [[orthogonal#Computer science|non-orthogonal]] data semantics and device control. Unix eliminated this complexity with the concept of a data stream: an ordered sequence of data bytes which can be read until the [[End-of-file|end of file]]. A program may also write bytes as desired and need not, and cannot easily declare their count or grouping. Another Unix breakthrough was to automatically associate input and output to terminal keyboard and terminal display, respectively, by default{{citation needed|date=December 2013}} — the program (and programmer) did absolutely nothing to establish input and output for a typical input-process-output program (unless it chose a different paradigm). In contrast, previous operating systems usually required some—often complex—[[Job Control Language|job control language]] to establish connections, or the equivalent burden had to be orchestrated by the program.{{citation needed|date=October 2017}} Since Unix provided standard streams, the Unix [[C (programming language)|C]] runtime environment was obliged to support it as well. As a result, most C runtime environments (and [[C (programming language)#Related languages|C's descendants]]), regardless of the operating system, provide equivalent functionality. {{anchor|stdin}}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)