Adds a file descriptor to this.
The file descriptor is duplicated using dup. You keep your copy of the descriptor and the copy contained in
this will be closed when this is finalized.
A possible cause of failure is exceeding the per-process or system-wide file descriptor limit.
The index of the file descriptor in the list is returned. If you use this index with @get then you will receive back a duplicated copy of the same file descriptor.
| this | |
| fd |
a valid open file descriptor |
|
the index of the appended fd in case of success, else -1 (and throws is set) |