[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: vms argv[0] and exit status fixes.
From: |
John E. Malmberg |
Subject: |
Re: vms argv[0] and exit status fixes. |
Date: |
Wed, 05 Mar 2014 23:18:01 -0600 |
User-agent: |
Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 |
New patch attached as described below.
On 3/5/2014 3:30 PM, h.becker wrote:
I'm still looking at this, so I may change my mind or suggest to change
the code :-)
The main wrapper:
There were/are problems with the program name, however I'm not sure
whether the wrapper solves them. For DCL the wrapper, as before,
requires a foreign command pointing to the executable (or the logical
DCL$PATH pointing to the directory with the matching executable).
<snip>
but when you want to use a different symbol:
$ del/symb make
$ gmake := $USR_ODS5:[BECKER_H.make.make]make.exe
$ gmake -f MAKE_COMMAND.mf
make
$ gmake -f MAKE_COMMAND.mf x
make -f x.mf
%DCL-W-IVVERB, unrecognized command verb - check validity and spelling
\MAKE\
$
There is no way that I know of to know what foreign symbol was used to
invoke an image. All we get is the image path in one of three formats
based on what the decc$ feature settings.
I already made some changes for this, but I'm not yet convinced - it's
not really nice and there may be other side effects:
I think that a solution is to convert the original arvg[0] to VMS format
if needed and then use lib$set_symbol() to create a foreign command that
is visible to the child programs with the new argv[0].
So lets try that with the make symbol missing, but a gmake symbol defined.
EAGLE> make -f makecommand.mf x
%DCL-W-IVVERB, unrecognized command verb - check validity and spelling
\MAKE\
EAGLE> gmake -f makecommand.mf x
make -f x.mf
here we are
The side effect is that it leaves a local symbol make behind. Not too bad.
That source module is or can be a common source file for the latest
ports of GNU bash, grep, and sed.
I made setting the symbol a compile time option, since those other
programs do not need it set.
SYS$SCRATCH:
I know that the VMS CRTL does some special handling for /tmp. As far as
I know, this is translated to SYS$SCRATCH:. So there seems to be no need
to replace sys$scratch with /tmp. But tmp (or TMP?) may be a logical
name pointing to a different directory and then that directory is used
as scratch directory. Whether that is a good thing or just confusing, is
another question. SYS$SCRATCH seems more obvious to me.
If someone has defined /TMP to other than SYS$SCRATCH: then they will
probably be suprised if a GNU utility is not honoring it and still using
SYS$SCRATCH:.
exit -> vms_exit:
Looks good to me, except MAKE_FAILURE is mapped twice and MAKE_TROUBLE
isn't mapped.
A bug, easily fixed.
If possible I would move the vms_exit function into a vms specific C
source, either an existing one or a new one. I would move any other vms
wrapper in such a module as well and reduce the to be included stuff to
"usual" header file content. (OK, I know there is vmsjobs.c)
If we move it out of a header file, it is no longer an in-lined static
function.
If die() is the only thing that calls exit, we can put it in the main.c
module.
The other place for it would be in the config.h-vms.template file.
With the previous patch posted:
270 Tests in 75 Categories Failed (See .diff* files in work dir for
details) :-(
With the current patch posted:
270 Tests in 75 Categories Failed (See .diff* files in work dir for
details) :-(
No changes. I think I finally have the test harness running correctly
on VMS.
Regards,
-John
0001-VMS-argv0-and-exit-status-fix-revision-1.patch.gz
Description: application/gzip
- vms argv[0] and exit status fixes., John E. Malmberg, 2014/03/05
- Re: vms argv[0] and exit status fixes., h.becker, 2014/03/05
- Re: vms argv[0] and exit status fixes.,
John E. Malmberg <=
- Re: vms argv[0] and exit status fixes., h.becker, 2014/03/06
- Re: vms argv[0] and exit status fixes., John E. Malmberg, 2014/03/07
- Re: vms argv[0] and exit status fixes., h.becker, 2014/03/08
- Re: vms argv[0] and exit status fixes., John E. Malmberg, 2014/03/08
- VMS exit status fixes., John E. Malmberg, 2014/03/08
- Re: vms argv[0] and exit status fixes., h.becker, 2014/03/10
- Re: vms argv[0] and exit status fixes., John E. Malmberg, 2014/03/10
- Re: vms argv[0] and exit status fixes., h.becker, 2014/03/11
- Re: vms argv[0] and exit status fixes., h.becker, 2014/03/24
- Re: vms argv[0] and exit status fixes., John E. Malmberg, 2014/03/25