home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / tcl / 2174 < prev    next >
Encoding:
Text File  |  1992-12-21  |  1.3 KB  |  29 lines

  1. Newsgroups: comp.lang.tcl
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!menudo.uh.edu!sugar!karl
  3. From: karl@NeoSoft.com (Karl Lehenbauer)
  4. Subject: Re: Strange error for null returned result
  5. Organization: NeoSoft Communications Services -- (713) 684-5900
  6. Date: Sat, 19 Dec 1992 02:41:23 GMT
  7. Message-ID: <BzHJH4.159@NeoSoft.com>
  8. Keywords: TCL/TK, error, null, eval, exec, fgrep
  9. References: <1992Dec18.025847.26643@bnr.ca> <1992Dec18.090123@adaclabs.com>
  10. Lines: 17
  11.  
  12. >In article <1992Dec18.025847.26643@bnr.ca>, tdoan@bnr.ca (Tuan Doan) writes:
  13. >|>    I think I encountered a very strange error condition in TCL/TK 2.3   For
  14. >|> the following logic:
  15. >|>    set t1 [eval exec "/bin/fgrep $pat /tempdir/clip.ps"]
  16. >|> works correctly if $pat exist in clip.ps   When fgrep could not find any
  17. >|> match and return null?, I get the following error:
  18. >|>     while executing
  19. >|> "exec /bin/fgrep adobe /tempdir/clip.ps"...
  20.  
  21. Yeah, a non-zero exit of a child from exec is treated as an error.  You
  22. can use catch to catch the error if you'd like.
  23.  
  24. It is a bug that there is no error message; the error message should start
  25. with something like "child returned nonzero exit stats".
  26. -- 
  27. -- Email info@NeoSoft.com for info on getting interactive Internet access.
  28. "In a minute, I'll burp up your droid."
  29.