; ; @ANO_SCRIPT_NAME sys_fork ; @ANO_SCRIPT_VERSION 0.0.1 ; @ANO_SCRIPT_DESCRIPTION Simple forking example ; ; @ANO_FLAGS_USE_PROTOS [ ] ; @ANO_FLAGS_VAR_NAME_SUBS [ ] ; @ANO_FLAGS_VAR_WARN_UNUSED [ ] ; ; Copyright (c) 2016-2026, Jani Salonen ; All rights reserved. ; ; Example to fork child process and make it to do some work. ; main [exit: 0] { ; Fork child process. ; fork mov _pid (rc) ; Parent process exits immediately... ; cmp _pid (0) jne "parent" ; ...and child process does all the work. ; mov _cmd ("uname") exec (_cmd, "-o", "-p", "-m", "-r") system ("hostname") parent: }