home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / mod.std.unix.v8 / text0023.txt < prev    next >
Encoding:
Internet Message Format  |  1987-06-30  |  2.5 KB

  1. From: dave%garfield.mun.cdn%ubc.csnet@RELAY.CS.NET (David Janes)
  2. Date: Sun, 2 Nov 86 11:29:02 pst
  3.  
  4. The tty driver should provide a character i/o interface to the outside
  5. world, and nothing else.
  6.  
  7. SIGWINCH, SIGSTOP, SIGCONT, etc. all have a similar purpose: to
  8. inform the user process that there has been a change in the `environment' 
  9. that the process is using. (The real purpose of SIGCONT, besides 
  10. putting a process back in run queue, is to inform a process that its 
  11. output screen has been dirtied.) In addition to signals, ioctls have been 
  12. added to ask the tty driver about it's environment: how big is my screen, 
  13. and so on.  All these are currently implemented as tty driver `aids', and 
  14. really have no place there.
  15.  
  16. The Solution: an `environment' file should be available for
  17. every tty device (including pseudo-ttys.)
  18. All changes to the tty's environment are reflected into this
  19. file. If the window size is changed (by whatever), the window
  20. size part of that file is modified. If the screen is `dirtied',
  21. a `dirty screen' flag is set, and so on. 
  22.  
  23. The environment file is a normal UNIX file. Some programs like init,
  24. and so on may need to be modified to keep this file with the
  25. right protections and so on, but this is basically minor.
  26.  
  27. Processes (including the kernel for some implementations) which change 
  28. the environment of the tty merely update this file when they
  29. make those changes.
  30.  
  31. One kernel change must be added. A SIGIO signal should be
  32. sent when this file is modified to all interested processes (who
  33. declare the interest via `fnctl' or some similar mechanism.)
  34. This change can be justified outside the concept of `environments'
  35. as a reasonable extension to the SIGIO facility.
  36.  
  37. The stopping and restarting of processes can be implemented 
  38. sensibly and independantly of this scheme.
  39.  
  40. NOTES:
  41. [1]    this could be added to system V to make job control as `nice'
  42.     to the user as Berkeley job control, and still be entirely backwards
  43.     compatable.
  44.  
  45. [2]    window management process (even if implemented in the kernel)
  46.     simply write their changes to the environment file if
  47.     the screen size gets changed.
  48.  
  49. [3]    simple window management, which doesn't redraw screens,
  50.     can be implemented under the same scheme. Thus, many styles
  51.     of `job control' (in the broad sense) may be implemented.
  52.  
  53. dave
  54. --
  55. .o.o.  The             UUCP: {utcsri,ihnp4,allegra,philabs}!garfield!dave
  56. .:O:.  Mercenary     CDNNET: David Janes <dave@garfield.mun.cdn>
  57. .o.o.  Programmer    "There can only be one!"
  58.  
  59. Volume-Number: Volume 8, Number 24
  60.  
  61.