[gs-devel] exit status on VMS and getting GS API working there
Jacob =JoukJansen
joukj at hrem.stm.tudelft.nl
Wed Apr 24 23:12:16 PDT 2002
forrest.cahoon at merrillcorp.com wrote on 24-APR-2002 19:44:40.77
>I've been looking at the problem of getting the Ghostscript API
>working on VMS, and there is a problem with the gp_do_exit() routine
>in gp_vms.c.
>
>In attempting to get the exit status correct for VMS, gp_do_exit()
>calls exit(), which has the disasterous effect of terminating any
>program that calls gsapi_exit().
I do not see the point here since gsapi_exit() calls the empty function
gp_exit() and not gsapi_exit().
>I only know about my system (Compaq C V6.5-001 on OpenVMS Alpha V7.3),
>but the exit status isn't correct anyway on it: a successful exit(0)
>is translated into an exit status of 1, which is a success in the VMS
>world, but an exit(1) failure also gives an exit status of 1: success.
>
>From the Compaq C docs and experimentation, I've figured out that one
>must #define _POSIX_EXIT before the first #include <stdlib.h> in order
>for exit(1) to generate an exit status indicating failure.
The reason for the difference in exit-code is backward compatibility towards
the times when there were no "Open"standards and VMS was its own standard.
(i.e. all systemservices and runtime library routines return 1 (=SS$_NORMAL) )
Peter also indicated in his reaction what the "GhostScript" solution to this
problem is.
>I don't know who else is using Ghostscript on VMS, or how the change
>I'm suggesting would effect anyone using VAX C or gcc. Is there
>anyone? I sometimes think I'm the only person using Ghostscript on VMS
>at all. (and I really really appreciate the efforts of the developers
>to keep it working on my platform! Thanks!)
You are definitley not the only one on OpenVMS. I normally check the CVS
version of GS and maintain the openvms.mmk file.
Jouk
Bush : All votes are equal but some votes are more equal than others.
>------------------------------------------------------------------------------<
Jouk Jansen
joukj at hrem.stm.tudelft.nl
Technische Universiteit Delft tttttttttt uu uu ddddddd
Nationaal centrum voor HREM tttttttttt uu uu dd dd
Rotterdamseweg 137 tt uu uu dd dd
2628 AL Delft tt uu uu dd dd
Nederland tt uu uu dd dd
tel. 31-15-2782272 tt uuuuuuu ddddddd
>------------------------------------------------------------------------------<
More information about the gs-devel
mailing list