develooper Front page | perl.perl5.porters | Postings from April 2012

[perl #3449] Problem with waitpid and wait on VMS

From:
Brian Fraser via RT
Date:
April 30, 2012 00:40
Subject:
[perl #3449] Problem with waitpid and wait on VMS
Message ID:
rt-3.6.HEAD-4610-1335768746-1952.3449-15-0@perl.org
On Fri Jun 30 00:44:47 2000, coucoureux.p@fr.ibm.com wrote:
> 
> 
> 
> This is a bug report for perl from coucoureux.p@fr.ibm.com,
> generated with the help of perlbug 1.26 running under perl 5.00503.
> 
> 
> -----------------------------------------------------------------
> When I try to wait a process started before, perl stop with the following
> message :
> Fatal VMS error (status=2280) at DISK$USR:[PTPC.PERL.P500503]VMS.C;1, line
> 779 a
> t wait.pl line 16.
> %SYSTEM-W-NONEXPR, nonexistent process
> 
> In fact, perl is waiting until process stop but do an error because the
> process
> is not still active.
> Same behaviour occurs if we give a wrong process id (except we don't
wait).
> Example :
> $ perl -e "waitpid 99999, 0 ;"
> Fatal VMS error (status=2280) at DISK$USR:[PTPC.PERL.P500503]VMS.C;1, line
> 779 .
> %SYSTEM-W-NONEXPR, nonexistent process
> 
> 
> wait.pl:
>  command = "run/detach disk\$usr:[ptpc.testperl]prog.exe|";
>  open (COMMAND, $command) || die "Pb to start $command\n";
>  $processDesc = <COMMAND>;
>  # Find process id returned by run
>  # run/detach return a string :
>  # %RUN-S_PROC-ID, identification of created process is
> 
>  if ( $processDesc =~ /.*is\s([\da-fA-F]+)/)
>  {
>     $processDesc = $1;
>     close COMMAND;
>  }
>  $processDesc = hex($processDesc);
>  print "Wait procesdesc=$processDesc\n";
> 
>  $endidPid = waitpid($processDesc, 0);
> 
>  print "End of the perl script\n";
> 
> Here you have the C program started by wait.pl:
> #include <stdio.h>
> int main(int argc, char*argv[])
> {
>      printf ("Hello\n");
>      sleep(10);
>      printf("Bye\n");
>      return(11);
> }
> 
> --------------------------------------------------------------------
> Site configuration information for perl 5.00503:
> 
> Configured by unknown at Mon may 15 12:02:29.96 2000.
> 
> Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
>   Platform:
>     osname=VMS, osvers=V7.2-1, archname=VMS_AXP
>     uname='VMS alphanze01 V7.2-1 Compaq AlphaServer ES40'
>     hint=none, useposix=false, d_sigaction=define
>     usethreads=undef useperlio=undef d_sfio=undef
>   Compiler:
>     cc='CC/DECC', optimize='undef', gccversion=undef
>     cppflags='undef'
>     ccflags
='/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoList'
>     stdchar='char', d_stdstdio=define, usevfork=true
>     intsize=4, longsize=4, ptrsize=4, doublesize=8
>     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
>     alignbytes=8, usemymalloc=N, prototype=define
>   Linker and Libraries:
>     ld='Link', ldflags ='/NoTrace/NoMap'
>     libpth=/sys$share /sys$library
>     libs=
>     libc=(DECCRTL), so=exe, useshrplib=undef, libperl=undef
>   Dynamic Linking:
>     dlsrc=dl_vms.c, dlext=exe, d_dlsymun=undef, ccdlflags=''
>     cccdlflags='', lddlflags='/Share'
> 
> Locally applied patches:
> 
> 
> ---
> @INC for perl 5.00503:
>     perl_root:[lib.VMS_AXP.5_00503]
>     perl_root:[lib]
>     perl_root:[lib.site_perl.VMS_AXP]
>     perl_root:[lib.site_perl]
>     .
> 
> ---
> Environment for perl 5.00503:
>     HOME=sys$sysroot:[sysmgr]
>     LANG (unset)
>     LANGUAGE (unset)
>     LD_LIBRARY_PATH (unset)
>     LOGDIR (unset)
>     PATH=sys$common:[tools.perl]
>     PERLSHR=PERL_ROOT:[000000]PERLSHR.EXE
>     PERL_BADLANG (unset)
>     PERL_ROOT=DKA0:[SYS0.SYSCOMMON.TOOLS.PERL.]
>     SHELL (unset)
> 
> 
> 

Another twelve year old ticket. I would say close it, seeing how the VMS
smokers don't seem to have this issue, but just in case I'm taking the
liberty to CC Craig Berry, since he seems to be the go-to person for VMS
issues. Apologies if I got that wrong!


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=3449



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About