home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume25 / pty4 / part04 / BLURB next >
Encoding:
Text File  |  1992-02-18  |  4.2 KB  |  76 lines

  1. pty is meant as the sole interface between pseudo-terminals and the rest
  2. of the system. Rich Salz said of pty 3.0: ``This is the Ginsu knife (it
  3. slices, it dices, it never rusts) that Dan has been talking about in
  4. comp.unix.wizards/internals for some time now. It is a mind-blower.''
  5. But I just couldn't leave well enough alone, so here's pty 4.0, a vastly
  6. improved rewrite of the entire package. A taste of what it has to offer:
  7.  
  8. * Improved security - pty 3.0 offered tty security ahead of its time---
  9. several months afterwards, Sun released a ``critical'' security patch
  10. with essentially the same security tests. Now pty 4.0 offers proven
  11. security. Although you can install and use the package without
  12. privileges, system administrators can install pty 4.0 so that it
  13. _guarantees_ that nobody else has access to your tty. I'm offering a
  14. cash reward for anyone who can subvert these guarantees.
  15.  
  16. * Session management - If you run your shell under pty, and the
  17. connection is hung up, you can log in again and reconnect. The session
  18. management model is extremely simple---it has just three primitives---
  19. yet powerful enough to accomplish tricky tasks, such as recording the
  20. output from a process after the process has started. A paper in the
  21. package, ``An introduction to session management,'' leads even novice
  22. users through competent use of session management commands.
  23.  
  24. * Automatic installation - pty 4.0 comes with a completely automated
  25. configure/compile/install/verify-configuration setup. It will configure
  26. itself properly for most popular systems without human input.
  27.  
  28. * Modularity - When I say that pty is meant as the sole interface to
  29. pseudo-terminals, I mean it! pty doesn't get in the way of direct,
  30. efficient pseudo-terminal I/O. So you can use it as a component of other
  31. programs which add input line editing, virtual screen support, or other
  32. fancy features. pty handles just one job, and handles it so cleanly that
  33. you'll never have to duplicate pseudo-terminal code in another program.
  34.  
  35. * Free utilities - pty 4.0 comes with even more useful utilities than
  36. pty 3.0. It includes ten improved clones of standard utilities, notably
  37. a version of ``script'' which makes a proper utmp entry; and thirty new
  38. tools ranging from administrative helpers to ``tscript'', which records
  39. an interactive session _including the timing between characters_. Power
  40. users will appreciate ``nobuf'', which uses pty to transparently turn
  41. off stdio buffering in any program.
  42.  
  43. * Free libraries - The pty package comes with several of my favorite
  44. libraries: env, fmt, getopt, radixsort, ralloc, scan, sigdfl, sigsched,
  45. sod, timer, username. You can use all of these for your own programs.
  46.  
  47. * POSIX support - pty 4.0 works without trouble under popular POSIX/BSD
  48. systems, including Ultrix 4.1 and SunOS 4.1.1. All the job control
  49. features have been adapted to work with POSIX job control. pty should
  50. also be included with BSD 4.4.
  51.  
  52. * Detailed documentation - Let your worries about incomplete program
  53. documentation be over. The pty package includes more than five thousand
  54. lines of documentation: forty quick-reference man pages; papers on
  55. controlling ttys, job control, session management, and user log files;
  56. extensive notes on pty internals and porting issues; and more.
  57.  
  58. Okay, enough hype. What's pty good for? Once upon a time nethack would,
  59. if you were lucky, produce characters with both a ring of polymorph and
  60. a ring of polymorph control. I wanted to run nethack inside a script
  61. which would keep rerolling characters until it saw that combination.
  62. (Playing by the rules was never my forte.) Unfortunately, nethack didn't
  63. like having its input and output redirected. So I wrote the first
  64. versions of pty. ``pty nethack'' worked just like ``nethack'' but could
  65. be invoked in the middle of a pipe inside a script. As the years went
  66. by, pty became somewhat more powerful and flexible, but its basic
  67. function has always remained the same: to run programs, especially
  68. ``interactive'' programs, under a pseudo-tty. Despite this single-minded
  69. attitude, pty has wormed its way into the solutions to dozens of
  70. problems, ranging from buffer control to automating telnet scripts to
  71. making rlogind secure. Pseudo-terminal code seems to spring up
  72. everywhere; pty is your weapon to slash that code to a single line.
  73. Enjoy!
  74.  
  75. ---Dan Bernstein, brnstnd@nyu.edu
  76.