Sponsored Content
Full Discussion: Serial Lines Explained
Top Forums UNIX for Dummies Questions & Answers Serial Lines Explained Post 302912183 by Corona688 on Wednesday 6th of August 2014 11:56:56 AM
Old 08-06-2014
That's only half the story though. Serial ports in UNIX aren't just telecommunications, they're session control, job control, raw interaction.

I believe this all stems from the way terminals used to be used... You would login through a terminal, and that terminal would belong to you. Any processes you created would know what your terminal was(it would be your "controlling termina"). The kernel would know which processes were allowed to control it(foreground processes) or not allowed (background processes). Hitting ctrl-C would send SIGINT to processes belonging to your terminal. When you logged out, the group of processes belonging to that terminal would be killed.

Logging in through a remote teletype was almost the same, since it was an extension of the serial port. Modems had a few more signals, UNIX would know when a modem hung up for instance.

Having a "controlling terminal" does several things. For one thing, it means that all programs you run will be able to find out what your terminal is(they inherit their controlling terminal from you), and get direct access to it if they want it (by opening /dev/tty). This means that, even when you bury ssh in a 9-deep pipe chain, it can still go directly to the source and ask for your password. Or if /dev/tty can't be opened, they know there's no human there to ask for a password and just give up. If you ever see an error like "No tty present and no askpass program specified", that's what it means.

Last edited by Corona688; 08-06-2014 at 01:08 PM..
 

We Also Found This Discussion For You

1. Ubuntu

Ubuntu 9.04 Serial application to telnet to serial device

Hello! I am working on an application which reads environmental instruments which have serial ports. The application requires a serial port to be present to talk to the device (i.e. /dev/ttyS0 ). In some instances the environmental devices will be 100's of yards away from the computer, so a... (5 Replies)
Discussion started by: mvona
5 Replies
UPLCOM(4)						   BSD Kernel Interfaces Manual 						 UPLCOM(4)

NAME
uplcom -- USB support for Prolific PL-2303/2303X/2303HX serial adapters driver SYNOPSIS
To compile this driver into the kernel, place the following lines in your kernel configuration file: device uplcom device ucom Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5): uplcom_load="YES" DESCRIPTION
The uplcom driver provides support for various serial adapters based on the Prolific PL-2303, PL-2303X and PL-2303HX USB-to-RS232 Bridge chips. The device is accessed through the ucom(4) driver which makes it behave like a tty(4). HARDWARE
The uplcom driver supports the following adapters: o ATEN UC-232A o BAFO BF-800 o BAFO BF-810 o Belkin F5U257 o ELECOM UC-SGT o HAL Corporation Crossam2+USB IR commander o Hama USB RS-232 Serial Adapter o Hamlet exagerate XURS232 o IOGEAR UC-232A o I/O DATA USB-RSAQ o I/O DATA USB-RSAQ2 o I/O DATA USB-RSAQ3 o Mobile Action MA-620 Infrared Adapter o PLANEX USB-RS232 URS-03 o RATOC REX-USB60 o Radio Shack USB Serial Cable o Sandberg USB to Serial Link (model number 133-08) o SOURCENEXT KeikaiDenwa 8 (with and without charger) o Sony Ericsson USB Cable (Susteen USB Data Cable) o Willcom W-SIM DD PHS terminal.(WS002IN) SEE ALSO
tty(4), ucom(4), usb(4) HISTORY
The uplcom driver appeared in NetBSD 1.6. This manual page was adopted from NetBSD by Tom Rhodes <trhodes@FreeBSD.org> in April 2002. BSD
November 22, 2006 BSD
All times are GMT -4. The time now is 07:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy