> in p9p rc, an `if (/bin/false)' statement without `if not' statement causes > non-empty $status, and thus will terminate mk. > [...] > > is that really the expected behavior, or is it a quirk of p9p rc? > > is there a point to, or an use case for this behavior?
the more idiomatic way to write this is if(~ 0 1); plan 9 has no /bin/false. plan 9 rc behaves in the same way, and the usual solution is to use ~ 0 0 to clear the status, or exit ''. i have seen scripts reuse the status, especially of a pipe inside the if. (obviously the status is the same in either branch.) i don't think this is a bug, nor due i think it could be changed in a manner compatable with existing scripts. - erik
