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

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

Thread Previous | Thread Next
From:
Paul Fenwick
Date:
June 17, 2008 20:37
Subject:
Win32 exit values (was: Generic system() replacements)
Message ID:
485882E6.4020809@perltraining.com.au
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%
	10000

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

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%
	1000000

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 http://www.ActiveState.com
Built Jan 10 2008 11:00:53

Cheerio,

	Paul

-- 
Paul Fenwick <pjf@perltraining.com.au> | http://perltraining.com.au/
Director of Training                   | Ph:  +61 3 9354 6001
Perl Training Australia                | Fax: +61 3 9354 2681

Thread Previous | Thread Next


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