Commit Graph

2364 Commits

Author SHA1 Message Date
tg 117bb02e6a check at least *one* of our “Duff’s Device” heavy occurrences
to make sure the compiler doesn’t frag it
2013-02-11 13:06:54 +00:00
tg fb370a30c6 fix set -e with and/or inside functions regression (LP#1104543)
cause was that use of && or || inside function switched it to xerrok
2013-02-10 23:59:28 +00:00
tg 63cf38eca7 sync description for funsubs 2013-02-10 23:58:19 +00:00
tg 738f5f54fa get rid of unneeded variables ⇒ error handling (that wasn’t there
previously) ⇒ code ⇒ simplify!
2013-02-10 23:43:59 +00:00
tg 19cbb1ab78 regression test for: return works in funsub (like AT&T ksh93), local works in funsub (like in functions), exit does not work in funsub (sadly unlike ksh93, like in functions) 2013-02-10 23:36:21 +00:00
tg c95d0ad11e missed in cid 10050B914D41435E735 2013-02-10 23:32:18 +00:00
tg 9bf0509829 provide a layer of locality to FUNSUBs; get rid of a fork for each PS1 thus 2013-02-10 23:30:47 +00:00
tg 1df0cb4093 as a more general solution to fd leak detection, just do CLOEXEC manually
(this also allows us to see “real” leaks)
2013-02-10 21:42:16 +00:00
tg 42e1bdc095 doc update 2013-02-10 21:20:57 +00:00
tg f209a252bc when leak debugging, free everything even in builtins 2013-02-10 21:17:07 +00:00
tg 51345bd33b do not leak file descriptors on builtins
(this is for valgrind; we use close-on-exec on them in the normal case)
2013-02-10 21:08:35 +00:00
tg 2b06709bf3 improve DEBUG_LEAKS handling and fix freeing some locs 2013-02-10 19:05:37 +00:00
tg af39f3b7b0 do NOT close stdout or stderr, redirect to /dev/null instead
⇒ we did have issues with that, trust me…
2013-02-10 19:04:00 +00:00
tg 43a41932e7 make DEBUG_LEAKS safely free all resources before the main shell exits 2013-02-10 18:17:30 +00:00
tg ce1ab97541 for DEBUG_LEAKS, prevent “leaking” of fds, even if they’re close-on-exit 2013-02-10 17:55:57 +00:00
tg 5741127ab7 experimentally enable afreeall(APERM) too, LP#1106116 2013-02-10 17:43:07 +00:00
tg 59009ac78f call it DEBUG_LEAKS so Android can always enable it 2013-02-10 17:41:06 +00:00
tg 63b6d920a8 actually, only needed #ifdef DEBUG 2013-02-10 17:39:38 +00:00
tg cb93db360d call afreeall(AEDIT) upon close; related to LP#1106116 2013-02-10 17:38:15 +00:00
tg 1da94d6159 pure RCSID sync with oksh, who also added a tabcompletion fix now, with
less code, but, even according to their own comments, not as good as ours
2013-02-10 17:18:49 +00:00
tg 72c895c4a1 precmd is required to retain the errorlevel when ${ …;} is used 2013-01-21 15:06:24 +00:00
tg 9111faeeb5 besides more code reuse, fix $'…' everywhere (but keep it ignored in here document bodies that aren’t here strings) 2013-01-19 19:47:13 +00:00
tg e307cb34c4 use the full parser code for handling here strings (and here document words)
as ormaaj requested, including a testcase
2013-01-19 18:32:56 +00:00
tg 72402c4990 permit $'\n' in the bar part of ${foo:-bar}
XXX this changes slightly the herestring part
2013-01-19 17:49:46 +00:00
tg 24164e07d4 rcsid-only sync 2013-01-19 17:27:05 +00:00
tg c99a634f92 remove separate SHERESTRING parsing state, it’s the same as SHEREDELIM 2013-01-19 17:20:02 +00:00
tg b23d768a9b Unbreak linking on AIX, reported (with fix) by Torsten Sillke, 10x! 2013-01-12 02:25:01 +00:00
tg 2d9a039ec0 ormaaj reported “command shift” not working correctly; fix 2013-01-06 18:51:43 +00:00
tg 7a2130b02a do not, ever, even in local-only debugging examples, create anything
in /tmp without the use of mkstemp(3) or similar!
2013-01-06 18:44:07 +00:00
tg d5ba31fd86 fix the set +e cases, too 2013-01-01 22:23:16 +00:00
tg 72a748c891 if you have to look *this* up, danger ahead; point to porter's info 2013-01-01 21:19:36 +00:00
tg 744f77c668 fix running the ERR and EXIT traps in case of set -e and/or eval (includes Debian #696823) 2013-01-01 20:45:04 +00:00
tg 0700d45ce6 while thinking about mirlibₘᵢₙc I figured that sys_errlist[] entries may be NULL 2013-01-01 03:32:44 +00:00
tg 23325a3355 just blacklist cd-pe on QNX as well 2012-12-28 07:45:55 +00:00
tg 0ce1ca41cb carefully begin owcc (Watcom C’s POSIX cc wrapper) support 2012-12-28 04:58:13 +00:00
tg d91800c88d RT’s build logs show that do{}while(0) is better than functional programming 2012-12-28 04:47:50 +00:00
tg f40e8b4d3d QNX 4 oh-so-argh! 2012-12-28 04:29:56 +00:00
tg a2042321ac meh, just don’t ever use ls(1) in a test; on some, it shows dotdirs 2012-12-28 04:25:32 +00:00
tg 39682506ff experimental test rewriting for QNX fun 2012-12-28 04:01:17 +00:00
tg 113db497ba RT says QNX 4 has _SIGMAX not SIGMAX or NSIG 2012-12-28 03:35:34 +00:00
tg 192ea7638b now that we found out the root case for the recent QNX problem…
03:11⎜«RT|AO:#!/bin/mksh» YES it WORKS now!
… there’s no reason for sys_nerr to not be const, either ☺
2012-12-28 03:20:35 +00:00
tg 595f57ebad mark glob-range-3 as need-pass: no 2012-12-28 03:18:46 +00:00
tg f7acd1f3fc AIEEE!
03:00⎜«RT|AO:#!/bin/mksh» cc -c -o a.out does not output a.out but conftest.o (!!)
evil… just use tcfn=conftest.o for now, cf. cid 1004713D70A5362BACF (but why must it be one?)
2012-12-28 03:05:17 +00:00
tg b2396677e7 harmonise sys_{sig,err}list ⓐ checks, ⓑ uses, ⓒ _decl values when not needed, ⓓ prototypes; ⓔ “const” is a keyword and thus space-separated from the preceding ‘*’ pointer indicator 2012-12-28 02:28:39 +00:00
tg 64eddba65f -D__EXT_UNIX_MISC needed for “extern const char * const sys_errlist[];” on QNX 2012-12-27 15:52:47 +00:00
tg f998054508 16:39⎜«RT|Chatzilla:#!/bin/mksh» ok, tested cc -E outputs preprocessed out with leading space(!).
16:49⎜<mirabilos:#!/bin/mksh> that's like NeXTstep which insers spaces around =
16:49⎜<mirabilos:#!/bin/mksh> but we can sed that away I guess.
16:49⎜«RT|Chatzilla:#!/bin/mksh» yeah, modifying grep/sed lines adding " *" works
2012-12-24 17:50:10 +00:00
tg 866635468b RT says glob-range-3 breaks on QNX nowadays 2012-12-24 14:37:13 +00:00
tg 865728fb3d let printf stuff compile again after cstrerror-related change 2012-12-22 22:15:21 +00:00
tg 6d5e27a31a gcc-snapshot (see below) issued a clobber warning, and both it and mgcc
yowled about the memmove test until I found a compromise
gcc version 4.8.0 20121120 (experimental) [trunk revision 193662] (Debian 20121120-1)
2012-12-22 00:03:42 +00:00
tg ce602be6be sync clog et al. 2012-12-17 23:46:33 +00:00