home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume22 / ecu / patch02 / README.P2 < prev   
Encoding:
Text File  |  1991-08-16  |  2.2 KB  |  60 lines

  1. README.P2           ECU 3.10 Patch 2        Tue Aug 13 16:29:11 EDT 1991
  2.  
  3. This describes patch 2 to ECU 3.10, bringing the program to
  4. version 3.12. 
  5.  
  6. The majority of this patch deals with the way SCO and ISC misimplement
  7. the nap() system call.  A lingering problem with the interactive
  8. command history handler is also fixed (pressing erroneous function keys
  9. caused the display to become garbaged).
  10.  
  11. ISC and SCO UNIX nap() misbehave.  This kludge doesn't return the
  12. proper value (the actual time slept), but at least it does not make
  13. a mockery of the manual page.  It says:
  14.  
  15.      NAP(S)               UNIX System V            NAP(S)
  16.  
  17.      Name
  18.       nap -    suspends execution for a short interval
  19.  
  20.      Syntax
  21.       long nap(period)
  22.       long period;
  23.  
  24.      Description
  25.       The current process is suspended from    execution for at least
  26.       the number of    milliseconds specified by period, or until a
  27.       signal is received.
  28.  
  29.      Return Value
  30.       On successful    completion, a long integer indicating the
  31.       number of milliseconds actually slept    is returned. If    the
  32.       process received a signal while napping, the return value
  33.       will be -1, and errno    will be    set to EINTR.
  34.  
  35.      See Also
  36.       sleep(S)
  37.  
  38.      Notes
  39.       This function    is driven by the system    clock, which in    most
  40.       cases    has a granularity of tens of milliseconds.  This
  41.       function must    be linked with the linker option -lx.
  42.  
  43. It appears nap() under UNIX 3.2.x has departed virtually entirely from
  44. the manual page.  I'm beginning to look rather silly in several
  45. milleus since I keep telling people SCO UNIX is a viable upgrade from
  46. XENIX.  But process control people need some kind of timing capability
  47. less than one second and we can't do it with nap or select.
  48.  
  49. nap(msec) is supposed to nap *at least* msec milliseconds.  However,
  50. if msec is specified less than 1000/HZ + 1, it will not nap at all.
  51. This was true for 3.2.0 and 3.2.1.
  52.  
  53. It is supposed to return the number of milliseconds it actually
  54. slept.  Instead, it appears to "save up" the values and return them in
  55. lots of 1000. This behavior is true for 3.2.2.
  56.  
  57. As it is nap() is nearly useless.  I believe select() suffers
  58. from the same deficiency (< 1000 msec timeout becomes 1000 msec) but
  59. I haven't "proven" it yet.
  60.