diff options
author | Peter Prymmer <PPrymmer@factset.com> | 2003-07-03 19:59:51 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-07-04 04:48:37 +0000 |
commit | f9ecfa39b3c0ebc08fcafc5b1c5a334bffd755b6 (patch) | |
tree | ffe21c59087952a4f1f818791bb1037b9c8d121a | |
parent | 98718de32ba9128d7c985a9043d61c025725d7fa (diff) | |
download | perl-f9ecfa39b3c0ebc08fcafc5b1c5a334bffd755b6.tar.gz |
switch vmspipe.com over to using local symbols instead of global
Message-ID: <OF4DF4AA68.1EF12116-ON85256D59.00120F5E-85256D59.0015F58D@factset.com>
p4raw-id: //depot/perl@19976
-rw-r--r-- | vms/vms.c | 18 | ||||
-rw-r--r-- | vms/vmspipe.com | 12 |
2 files changed, 9 insertions, 21 deletions
@@ -2269,7 +2269,7 @@ vmspipe_tempfile(pTHX) } if (!fp) return 0; /* we're hosed */ - fprintf(fp,"$! 'f$verify(0)\n"); + fprintf(fp,"$! 'f$verify(0)'\n"); fprintf(fp,"$! --- protect against nonstandard definitions ---\n"); fprintf(fp,"$ perl_cfile = f$environment(\"procedure\")\n"); fprintf(fp,"$ perl_define = \"define/nolog\"\n"); @@ -2287,16 +2287,8 @@ vmspipe_tempfile(pTHX) fprintf(fp,"$c=c+perl_popen_cmd2\n"); fprintf(fp,"$x=perl_popen_cmd3\n"); fprintf(fp,"$c=c+x\n"); - fprintf(fp,"$! --- get rid of global symbols\n"); - fprintf(fp,"$ perl_del/symbol/global perl_popen_in\n"); - fprintf(fp,"$ perl_del/symbol/global perl_popen_err\n"); - fprintf(fp,"$ perl_del/symbol/global perl_popen_out\n"); - fprintf(fp,"$ perl_del/symbol/global perl_popen_cmd0\n"); - fprintf(fp,"$ perl_del/symbol/global perl_popen_cmd1\n"); - fprintf(fp,"$ perl_del/symbol/global perl_popen_cmd2\n"); - fprintf(fp,"$ perl_del/symbol/global perl_popen_cmd3\n"); fprintf(fp,"$ perl_on\n"); - fprintf(fp,"$ 'c\n"); + fprintf(fp,"$ 'c'\n"); fprintf(fp,"$ perl_status = $STATUS\n"); fprintf(fp,"$ perl_del 'perl_cfile'\n"); fprintf(fp,"$ perl_exit 'perl_status'\n"); @@ -2328,7 +2320,11 @@ safe_popen(pTHX_ char *cmd, char *in_mode, int *psts) { static int handler_set_up = FALSE; unsigned long int sts, flags = CLI$M_NOWAIT; - unsigned int table = LIB$K_CLI_GLOBAL_SYM; + /* The use of a GLOBAL table (as was done previously) rendered + * Perl's qx() or `` unusable from a C<$ SET SYMBOL/SCOPE=NOGLOBAL> DCL + * environment. Hence we've switched to LOCAL symbol table. + */ + unsigned int table = LIB$K_CLI_LOCAL_SYM; int j, wait = 0; char *p, mode[10], symbol[MAX_DCL_SYMBOL+1], *vmspipe; char in[512], out[512], err[512], mbx[512]; diff --git a/vms/vmspipe.com b/vms/vmspipe.com index 30ce592e86..dd23bf986c 100644 --- a/vms/vmspipe.com +++ b/vms/vmspipe.com @@ -1,4 +1,4 @@ -$! 'f$verify(0) +$! 'f$verify(0)' $! --- protect against nonstandard definitions --- $ perl_define = "define/nolog" $ perl_on = "on error then exit $STATUS" @@ -15,14 +15,6 @@ $c=c+perl_popen_cmd1 $c=c+perl_popen_cmd2 $x=perl_popen_cmd3 $c=c+x -$! --- get rid of global symbols -$ perl_del/symbol/global perl_popen_cmd0 -$ perl_del/symbol/global perl_popen_cmd1 -$ perl_del/symbol/global perl_popen_cmd2 -$ perl_del/symbol/global perl_popen_cmd3 -$ perl_del/symbol/global perl_popen_in -$ perl_del/symbol/global perl_popen_err -$ perl_del/symbol/global perl_popen_out $ perl_on -$ 'c +$ 'c' $ perl_exit '$STATUS' |