2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
17 fd
= mkstemp("T:lseekXXXXXX");
20 /* Check if F_GETFD and F_SETFD is working */
21 TEST((fcntl(fd
, F_GETFD
) == 0));
22 TEST((fcntl(fd
, F_SETFD
, FD_CLOEXEC
) == 0));
23 TEST((fcntl(fd
, F_GETFD
) == FD_CLOEXEC
));
24 TEST((fcntl(fd
, F_SETFD
, 0) == 0));
25 TEST((fcntl(fd
, F_GETFD
) == 0));
30 /* Check if descriptor flags are independent for duped descriptors */
31 TEST((fcntl(fd2
, F_GETFD
) == 0));
32 TEST((fcntl(fd2
, F_SETFD
, FD_CLOEXEC
) == 0));
33 TEST((fcntl(fd2
, F_GETFD
) == FD_CLOEXEC
));
34 TEST((fcntl(fd
, F_GETFD
) == 0));
35 TEST((fcntl(fd
, F_SETFD
, FD_CLOEXEC
) == 0));
36 TEST((fcntl(fd2
, F_SETFD
, 0) == 0));
37 TEST((fcntl(fd
, F_GETFD
) == FD_CLOEXEC
));