|
|
1.1 root 1: # C library -- fork
2:
3: # pid = fork();
4: #
5: # r1 == 0 in parent process, r1 == 1 in child process.
6: # r0 == pid of child in parent, r0 == pid of parent in child.
7:
8: .set fork,2
9: .globl _fork
10:
11: _fork:
12: .word 0x0000
13: chmk $fork
14: bcc forkok
15: jmp cerror
16: forkok:
17: jlbc r1,parent
18: clrl r0 # signify child
19: parent:
20: ret
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.