HandleDuplicate¶
Creates a second handle to the same object, with the same or fewer permissions.
| Number | Selector | Blocking | Since |
|---|---|---|---|
0x08 SVC_MANAGEHANDLE |
MNGHNDL_DUPLICATE (0) |
no | 2.0 |
SvcResult HandleDuplicate(Handle h, HandlePerms perms, Marker marker);
Registers: (h, perms, marker) -> r0 status, r1 new handle
marker is only applied when h is a port owned by the caller's space; a server uses it to tell its callers apart. Any other handle keeps its current marker. HandleDup() is the easier form.
Parameters¶
| Name | Direction | Description |
|---|---|---|
h |
in | Handle to duplicate. |
perms |
in | Permissions for the copy; intersected with those of h. |
marker |
in | Marker for the copy (own ports only). |
Returns¶
r0 is the status; r1 the new handle on success.
Errors¶
| Error | Condition |
|---|---|
ERR_BADHANDLE |
h is not a live handle. |
ERR_NOMEM |
The caller's handle table is full. |