|
|
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: fork = 2
9: .globl _fork
10: .globl _vfork
11:
12: _vfork:
13: _fork:
14: linkw a6,#0
15: pea fork
16: trap #0
17: bcc forkok
18: jmp cerror
19: forkok:
20: andl #1,d1
21: beq parent
22: clrl d0 | signify child
23: parent:
24: unlk a6
25: rts
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.