home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / hp / 10365 < prev    next >
Encoding:
Internet Message Format  |  1992-09-13  |  2.0 KB

  1. Path: sparky!uunet!munnari.oz.au!yoyo.aarnet.edu.au!dstos3.dsto.gov.au!ewd!michael
  2. From: michael@ewd.dsto.gov.au (Michael Balin)
  3. Newsgroups: comp.sys.hp
  4. Subject: Fix to stop mail loss using elm from VUE.
  5. Keywords: elm
  6. Message-ID: <1992Sep14.101136.164514@dstos3.dsto.gov.au>
  7. Date: 14 Sep 92 16:11:34 GMT
  8. Sender: michael@ewd (Michael Balin)
  9. Followup-To: comp.sys.hp
  10. Organization: Defence Science and Technology Organisation, Salisbury, South Australia
  11. Lines: 41
  12. Nntp-Posting-Host: oberon.dsto.gov.au
  13.  
  14. The problem is caused when elm is invoked under VUE. When mailing or
  15. forwarding a message (but strangely, not when bouncing one) elm causes
  16. sendmail processes to be spawned, but does not wait until they have completed
  17. before signalling "Mail sent!" (in its insufferably cheerful manner.)
  18. If one quits elm quickly enough, the terminal window closes and all processes
  19. linked to that tty are killed - in the case of any unfinished sendmails,
  20. before they've finished sending the mail.
  21.  
  22. I can't say as yet whether the publically available version of elm will prevent
  23. the problem or not. If it doesn't, or if there are reasons why you don't want to
  24. install it, this replacement of the VUE action which calls elm should avoid the
  25. problem. It waits for the sendmail processes to complete before allowing the
  26. terminal opened by VUE to close.
  27.  
  28.  
  29. In /usr/local/lib/X11/vue/types/vue.ad:
  30. changed
  31. ELM     * ${ACTION_L} ${ACTION_S} COMMAND TERMINAL %LocalHost% \
  32.         /usr/bin/elm
  33. to
  34. ELM     * ${ACTION_L} ${ACTION_S} COMMAND TERMINAL %LocalHost% \
  35.         /usr/local/bin/scripts/elm-safe
  36.  
  37. Created /usr/local/bin/scripts/elm-safe:
  38. #!/bin/csh -f
  39. set tty=`/bin/tty`
  40. set tty=$tty:t
  41. /usr/bin/elm
  42. while(`ps -ef | grep $tty | grep mail | grep -v grep | wc -w`)
  43.   echo "Waiting for sendmail to finish..."
  44.   sleep 1
  45. end
  46.  
  47.  
  48. Not too elegant, but it works. :-)
  49.  
  50. Michael.
  51.  
  52. --
  53. Michael Balin            "I never carry weapons. If people see you mean them no
  54. michael@ewd.dsto.gov.au   harm, they never hurt you. Nine times out of ten..."
  55.