1KATTACH(2) LAM LOCAL LIBRARY KATTACH(2)
2
3
4
6 kattach, kdetach - Attach/detach a process to/from the local LAM dae‐
7 mon.
8
10 int kattach (int priority);
11 int kdetach (int pid);
12
14 These functions allow a process to join and leave a LAM session. An
15 existing process running under the native operating system calls kat‐
16 tach() to register with the local LAM daemon. The LAM daemon must
17 already be running or the operation fails and an error is returned.
18
19 kattach() is eventually called by kenter(2) and is therefore typically
20 used in rare cases when a process wishes to change priority or return
21 to the LAM session after temporarily detaching. kattach() cannot be
22 called before kenter(2). The priority argument determines the synchro‐
23 nization priority of the calling process. See kenter(2).
24
25 kdetach() de-registers a process from the local LAM daemon. The
26 process "dies" as far as the LAM daemon is concerned. It effectively
27 undoes what kattach() did. kdetach() is eventually called by kexit(2)
28 and is therefore typically used in rare cases when a process wishes to
29 leave LAM control without terminating. The pid argument is the process
30 ID of the process to be detached. A process ID of 0 is interpreted as
31 a request to detach the calling process, and is the normal usage of
32 kdetach(). Detaching peer LAM processes is intended as an emergency
33 clean up measure and is not normal usage.
34
36 ENOKERNEL The LAM daemon is not running.
37
38 ENOTATTACHED The calling process is not a LAM process.
39
41 kenter(2), kexit(2)
42
43
44
45LAM 7.1.2 March, 2006 KATTACH(2)