home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / tcl / 1844 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  1.5 KB

  1. Path: sparky!uunet!dove!cme!libes
  2. From: libes@cme.nist.gov (Don Libes)
  3. Newsgroups: comp.lang.tcl
  4. Subject: Re: Expect can read its script from stdin, but then interact doesn't work
  5. Message-ID: <20191@muffin.cme.nist.gov>
  6. Date: 16 Nov 92 21:25:18 GMT
  7. References: <1992Nov12.202657.15587@midway.uchicago.edu>
  8. Organization: National Institute of Standards and Technology
  9. Lines: 29
  10.  
  11. In article <1992Nov12.202657.15587@midway.uchicago.edu> pynq@midway.uchicago.edu writes:
  12. >I'm just curious if this is something that will be fixed or if it is a
  13. >builtin deficiency.  I spent a fair amount of time tearing my hair over
  14. >this one - I couldn't understand why my script was mysteriously
  15. >terminating itself at the interact statement.
  16. >
  17. >My shell script was something like:
  18. >
  19. >    nawk '...' | expect -
  20. >
  21. >where nawk builds up the script and pipes it to expect.
  22.  
  23. This is (almost) funny.  The whole point of Expect is to get around
  24. programs that make assumptions that the user must be reached via
  25. /dev/tty.
  26.  
  27. >I would have expected stdin/stdout to be forced to something like
  28. >/dev/tty before the interact is executed.  Is there some way I can cause
  29. >this to happen?
  30.  
  31. Yeah, get an older version (:-) It actually used to work as you want
  32. it to.  I ran into a case where that was clearly wrong.  So I changed
  33. it.  I should've provided access for /dev/tty through a reserved
  34. spawn_id.  I just didn't have the foresight.
  35.  
  36. How about "dev_tty_spawn_id"?  "devtty_spawn_id"?  "tty_spawn_id"?
  37. ("user_spawn_id" already refers to stdin/out.)
  38.  
  39. Don
  40.