|Hi Stefan,

I had to face "Steve" because Mrs. Jaeger asked that guy (Stephan,
i have forgotten hist name otherwise) first, so he became
"Stephen" and when i reported in return nothing else at all
remained.  Ah, i was to young, i should have insisted on our
German names after all.  Just call me Steffen.

 |>> The previous versions (14.8.16 and earlier) did neither print these
 |>> warnings nor segfaulted.
 |>
 |> I consider these new verifications an improvement, you need to
 |> redirect standard error to /dev/null to get rid of those
 |
 |But this discards all errors.  `foo 2> >(grep -v '^foo: bar$' >&2)'
 |avoids this, but is tedious, and breaks any synchronisation that foo
 |might do by flushing of stdout and stderr.

Yes, well..

 |> (The idea is that we now catch things when they get set as necessary,
 |> and can use them without further tests from then on.
 |
 |That sounds like a race condition.  :-)  Especially in a long-lived
 |program.  What later operations don't bother error checking because
 |$HOME is not writable, for example?

Well, we initially fall back to what the user database reports for
the local user if $HOME does not work out.  Of course later
failures are still handled (much too many are fatal still where
that may not be necessary, however).  But we know $HOME, $TMPDIR
etc. are set and do not need myriads of unnecessary conditionals
in the code.  It is just that when you actively set something you
will be protected from errors, or at least get informed of those.
It is not yet final, sometimes a number variable only allows
a specific subset of numbers, which is not handled, but at least
we know it is a number, not some random string.

It has been you who inspired the change, btw., i think some
message on the nmh list did this.

  commit 65e2b75f38b09c4e59db12953311401a91495af4
  Author:     Steffen (Daode) Nurpmeso <[email protected]>
  AuthorDate: 2017-03-06 17:43:37 +0100
  Commit:     Steffen (Daode) Nurpmeso <[email protected]>
  CommitDate: 2017-04-13 23:06:56 +0200

    Redefine VIP handling of variables (Ralph Corderoy)..
    
    I realized that our VIP handling no longer reflects the
    capabilities and necessities of our variable system!
    Split that in SET_PRE, SET_POST and CLEAR, to be able to perform
    pre-checks, post-assignment dependency updates, and clearance.
    This allows some simplifications, too.
    Before:
    
      ?0[]$ TMPDIR=/nonexistent HOME=/nonexistent s-nail -R
      s-nail: $TMPDIR is not a directory or not accessible: /nonexistent
      s-nail version v14.9.0-pre3-168-gdb8d67b1.  Type `?' for help
      /var/spool/mail/steffen: 0 messages [Read-only]
      There are new messages in the error message ring (denoted by ERROR)
        The `errors' command manages this message ring
      ERROR# ?0!0[#/var/spool/mail/steffen]? var TMPDIR HOME
      set TMPDIR=/tmp
      set HOME=/home/steffen
      ?0!0[#/var/spool/mail/steffen]? set HOME=/nonexistent
      ?0!0[#/var/spool/mail/steffen]? set TMPDIR=/nonexistent
      ?0!0[#/var/spool/mail/steffen]? var TMPDIR HOME
      set TMPDIR=/nonexistent
      set HOME=/nonexistent
    
    After:
    
      ?0[]$  TMPDIR=/nonexistent HOME=/nonexistent s-nail -R
      s-nail: $HOME is not a directory or not accessible: /nonexistent
      s-nail: $TMPDIR is not a directory or not accessible: /nonexistent
      s-nail version v14.9.0-pre3-199-g180daa6d-dirty.  Type `?' for help
      /var/spool/mail/steffen: 0 messages [Read-only]
      There are new messages in the error message ring (denoted by ERROR)
        The `errors' command manages this message ring
      ERROR# ?0!0[#/var/spool/mail/steffen]? var TMPDIR HOME
      set TMPDIR=/tmp
      set HOME=/home/steffen
      ?0!0[#/var/spool/mail/steffen]? set HOME=/nonexistent TMPDIR=/nonexistent
      s-nail: $HOME is not a directory or not accessible: /nonexistent
      s-nail: Assignment of variable aborted: HOME
      s-nail: $TMPDIR is not a directory or not accessible: /nonexistent
      s-nail: Assignment of variable aborted: TMPDIR
      ERROR# ?0!22[#/var/spool/mail/steffen]? var TMPDIR HOME
      set TMPDIR=/tmp
      set HOME=/home/steffen

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
__________________________________
[email protected]

Reply via email to