From kde-core-devel Sat Apr 15 15:32:16 2006 From: Thiago Macieira Date: Sat, 15 Apr 2006 15:32:16 +0000 To: kde-core-devel Subject: Re: KProcess overhaul Message-Id: <200604151732.17479.thiago () kde ! org> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=114511522525230 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--nextPart1476820.77AFo553Z3" --nextPart1476820.77AFo553Z3 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Ralf Habacker wrote: >> 9. on unix, it should be able to deal with ptys >> =A0 > >Can you explain a non unix user for what this is good ? A PTY (Pseudo-Teletype) is a special device that terminal programs use in=20 Unix. Each process has one Controlling TTY, which is the terminal they=20 are associated with. Originally, the TTYs were serial ports, when computers were accessed using= =20 dumb terminals. On Linux, today, the Virtual Terminals are TTYs. Also, we=20 have the pseudo ones that, instead of being connected to a device (serial=20 port, printer, monitor+keyboard, dumb terminal, etc.), are like pipes: a=20 program behind the scenes receives the output and sends the input. The easiest way to understand this is the telnet daemon: when a new=20 connection is received, it opens a new pty and runs the user's shell in=20 there. When the user types (i.e., when the telnet server receives data on=20 its network socket), it sends data over the pty to the shell. When the=20 shell outputs something, the server receives data on the pty and sends it=20 back over the network socket. The shell and terminal programs cannot tell=20 apart a pty from a real terminal. Think of pty as special pipes. The difference here is that the API to open= =20 a new PTY (open the master, discover the name of the slave, etc.), set it=20 up, fork the child process and set the PTY as its controlling terminal=20 varies quite a bit between OSes. =2D-=20 Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org thiago.macieira (AT) trolltech.com Trolltech AS GPG: 0x6EF45358 | Sandakerveien 116, E067 918B B660 DBD1 105C | NO-0402 966C 33F5 F005 6EF4 5358 | Oslo, Norway --nextPart1476820.77AFo553Z3 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQBEQRIBM/XwBW70U1gRAoM5AJ9MRe/NN1e7lWJ3mkyV9fuyqrAL3wCgvm6h BbaOXRNWqyqUDTeQvdBwMcA= =/cSb -----END PGP SIGNATURE----- --nextPart1476820.77AFo553Z3--