lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



Message: 12
Date: Fri, 18 Jan 2013 22:32:06 -0200
From: Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>
Subject: Re: os.execute returns mangled exit code on linux
To: Lua mailing list <lua-l@lists.lua.org>
Message-ID: <20130119003205.GA587@magritte.tecgraf.puc-rio.br">20130119003205.GA587@magritte.tecgraf.puc-rio.br>
Content-Type: text/plain; charset=us-ascii

> This was first mentioned on the mailing list in 2004, but the bug still
> exists today :
> print( os.execute("exit 1") )
> 256

In both Mac OS X and Linux I get this with Lua 5.2.1:

% lua
Lua 5.2.1  Copyright (C) 1994-2012 Lua.org, PUC-Rio
> print( os.execute("exit 1") )
nil     exit    1


Apologies, you're right it's fixed. I didn't read luaL_execresult.