📄 dup.2
字号:
.th DUP II 8/5/73.sh NAMEdup \*- duplicate an open file descriptor.sh SYNOPSIS(dup = 41.; not in assembler).br(file descriptor in r0).br.ft Bsys dup.s3dup(fildes).brint fildes;.ft R.sh DESCRIPTIONGivena file descriptor returned froman.it open,.it pipe,or.it creatcall,.it dupwill allocate another file descriptorsynonymouswiththe original.The new file descriptor is returned in r0..s3.it Dupis used more to reassign the valueof file descriptorsthan to genuinelyduplicate a file descriptor.Since the algorithm to allocatefile descriptorsreturns thelowest availablevalue,combinations of.it dupand.it closecan beused tomanipulate file descriptorsin a general way.This is handy formanipulating standard input and/orstandard output..sh "SEE ALSO"creat (II), open (II), close (II), pipe (II).sh DIAGNOSTICSTheerror bit (c-bit)is set if:the given file descriptor is invalid;there are already too many open files.From C, a \*-1 returned value indicates an error.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -