본문 바로가기

컴퓨터/C

C dup()

I. syntax

#include <unistd.h>

int dup(int fd);

파일 디스크립터를 복제한다.

II. return

성공시 파일 디스크립터, 실패시 -1을 반환한다.

III. argument

int fd: 복제할 파일 디스크립터

'컴퓨터 > C' 카테고리의 다른 글

C strtok()  (0) 2022.11.23
C strstr()  (0) 2022.11.23
C pthread_detach()  (0) 2022.11.23
C pthread_create()  (0) 2022.11.23
C process, thread 프로세스, 스레드  (0) 2022.11.21