summaryrefslogtreecommitdiff
path: root/vms/vmspipe.com
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-12-29 17:48:04 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-12-29 17:48:04 +0000
commitd082dcd6e9724167401d515fda11cac153061911 (patch)
treef5b504acff0bfdbbe10523a37f8f03fb54b9d96a /vms/vmspipe.com
parentc7206c54089b550f8b7c01366011a58bd74a9703 (diff)
downloadperl-d082dcd6e9724167401d515fda11cac153061911.tar.gz
Further VMS piping fixes from Charles Lane:
In summary, error messages produced when a subprocess terminated abnormally were being sent not just to the parent process, but to grandparents, because of default values for error output that were not completely overridden when the subprocess was started. This patch fixes this behavior by defining user-mode (i.e., temporary for the duration of the program) logical names for SYS$OUTPUT and SYS$ERROR when they are (re)opened inside Perl. And a bunch of other changes to make it so that the user-mode logicals are the ones that control where Perl's error messages go if it terminates abnormally. I also added some gratuitous fixes to the indentation of braces in the piping code. It just looked ugly, before. p4raw-id: //depot/perl@8257
Diffstat (limited to 'vms/vmspipe.com')
-rw-r--r--vms/vmspipe.com6
1 files changed, 4 insertions, 2 deletions
diff --git a/vms/vmspipe.com b/vms/vmspipe.com
index bbb4461c72..652783eec5 100644
--- a/vms/vmspipe.com
+++ b/vms/vmspipe.com
@@ -6,12 +6,14 @@ $ perl_exit = "exit"
$ perl_del = "delete"
$ pif = "if"
$! --- define i/o redirection (sys$output set by lib$spawn)
-$ pif perl_popen_in .nes. "" then perl_define sys$input 'perl_popen_in'
-$ pif perl_popen_err .nes. "" then perl_define sys$error 'perl_popen_err'
+$ pif perl_popen_in .nes. "" then perl_define/user sys$input 'perl_popen_in'
+$ pif perl_popen_err .nes. "" then perl_define/user sys$error 'perl_popen_err'
+$ pif perl_popen_out .nes. "" then perl_define sys$output 'perl_popen_out'
$ cmd = perl_popen_cmd
$! --- get rid of global symbols
$ perl_del/symbol/global perl_popen_in
$ perl_del/symbol/global perl_popen_err
+$ perl_del/symbol/global perl_popen_out
$ perl_del/symbol/global perl_popen_cmd
$ perl_on
$ 'cmd