develooper Front page | perl.perl5.porters | Postings from June 2008

Win32 exit values (was: Generic system() replacements)

Thread Previous | Thread Next
Paul Fenwick
June 17, 2008 20:37
Win32 exit values (was: Generic system() replacements)
Message ID:
G'day Jan / p5p,

Jan Dubois wrote:

> On Windows the full exit status is actually a signed 32-bit integer,

Just doing some testing with this statement.  I can't seem to convince 
*perl* that it can return a 32-bit integer:

	C:\> perl -e"exit 10_000"
	C:\> echo %errorlevel%

	C:\> perl -e"exit 100_000"
	C:\> echo %errorlevel%

However I can set the 32-bit exit value with a batch file just fine 
(exit.bat contains "exit /b 100000")

	C:\> exit.bat
	C:\> echo %errorlevel%

I'm using ActiveState Perl 5.10.0:

C:\> perl -v

This is perl, v5.10.0 built for MSWin32-x86-multi-thread
(with 3 registered patches, see perl -V for more detail)

Copyright 1987-2007, Larry Wall

Binary build 1002 [283697] provided by ActiveState
Built Jan 10 2008 11:00:53



Paul Fenwick <> |
Director of Training                   | Ph:  +61 3 9354 6001
Perl Training Australia                | Fax: +61 3 9354 2681

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About