I found the return value of system(cmd) was 4611686018427387904 (=2^62)!
So this is the minimum code to reproduce the problem:
alpha# uname -srm
NetBSD 10.0_RC1 alpha
alpha# test foo ; echo $?
0
alpha# awk 'BEGIN { print(system("test foo")); }'
4611686018427387904
alpha#
On my AlphaServer DS25:
athena: {1} awk 'BEGIN { print(system("test foo")); }'
0
Perhaps a qemu problem?
John