Menu

#136 Native grep: weakening return code.

None
open
nobody
None
5
2019-07-09
2003-06-04
No

If the native grep image is run (via mc or dcl$path)
and doesn't find the search string, it returns a non
zero return code, which is used with the posix_exit,
and translated into a %CC-E-VAL*.

When run from a dcl procedure, the severity -E- aborts
normally the procedure, which is not generally meant.

In an ideal world, Unix should know the difference
between warning and error, and grep should only signal
a warning for the not-found case.

This patch adds a routine to dynamically weaken an
error into a warning only if not under a Unix shell.

The routine must reside in a library referenced by the
symbol XLIBS, and is meant to be used thru a
redefinition of exit like:
$ XDEFFLAGS = ",""exit(rc)""=""__posix_gnv_exit(rc)""",
before running the makefile.com modified by the path #
748978.

Discussion

  • Bernard Giroud

    Bernard Giroud - 2003-06-04

    native grep: weaken an error return code into a VMS status.

     
  • John Malmberg

    John Malmberg - 2019-07-09

    Ticket moved from /p/gnv/patches/7/