On Sat, Apr 16, 2011 at 11:34:28AM +0200, Taco Hoekwater wrote:
On 04/14/2011 07:30 PM, Heiko Oberdiek wrote:
Hello,
since some time LuaTeX os.execute() crashes with segmentation fault:
% luatex -ini \catcode`\{=1 \catcode`\}=2 \directlua{os.execute()} \csname @@end\endcsname\end
Results of beta-0.66.0 (rev 4141):
Program received signal SIGSEGV, Segmentation fault.
Fixed in branches/0.70.x (for the 0.70.x release && texlive 2011).
Many thanks. Looking at the diff: 977 if (cmd == NULL) { /* pretend we are \.{\\pdfshellescape} */ 978 if (shellenabledp <= 0) { 979 lua_pushinteger(L, 0); 980 } else if (restrictedshell == 0) { 981 lua_pushinteger(L, 1); 982 } else { 983 lua_pushinteger(L, 2); 984 } 985 return 1; 986 } Even better that the difference between restricted and unrestricted is available. Thus, is the following logic (pseudocode) is correct for getting the value of \pdfshellescape? if luatexversion >= 70 if os.execute return os.execute() else return 0 fi else if luatexversion > 40 % do you know accidently the correct value? pehaps_warn(Update luatex) return 0 else if os.execute if os.execute() > 0 return 1 else return 0 fi else return 0 fi fi fi Yours sincerely Heiko Oberdiek