Lines 3242-3247
Link Here
|
3242 |
case VKI_F_SETFD: |
3242 |
case VKI_F_SETFD: |
3243 |
case VKI_F_SETFL: |
3243 |
case VKI_F_SETFL: |
3244 |
case VKI_F_SETOWN: |
3244 |
case VKI_F_SETOWN: |
|
|
3245 |
case VKI_F_DUPFD_CLOEXEC: |
3245 |
PRINT("sys_fcntl[ARG3=='arg'] ( %ld, %ld, %ld )", ARG1,ARG2,ARG3); |
3246 |
PRINT("sys_fcntl[ARG3=='arg'] ( %ld, %ld, %ld )", ARG1,ARG2,ARG3); |
3246 |
PRE_REG_READ3(long, "fcntl", |
3247 |
PRE_REG_READ3(long, "fcntl", |
3247 |
unsigned int, fd, unsigned int, cmd, unsigned long, arg); |
3248 |
unsigned int, fd, unsigned int, cmd, unsigned long, arg); |
Lines 3291-3297
Link Here
|
3291 |
POST(sys_fcntl) |
3292 |
POST(sys_fcntl) |
3292 |
{ |
3293 |
{ |
3293 |
vg_assert(SUCCESS); |
3294 |
vg_assert(SUCCESS); |
3294 |
if (ARG2 == VKI_F_DUPFD) { |
3295 |
if (ARG2 == VKI_F_DUPFD || ARG2 == VKI_F_DUPFD_CLOEXEC) { |
3295 |
if (!ML_(fd_allowed)(RES, "fcntl(DUPFD)", tid, True)) { |
3296 |
if (!ML_(fd_allowed)(RES, "fcntl(DUPFD)", tid, True)) { |
3296 |
VG_(close)(RES); |
3297 |
VG_(close)(RES); |
3297 |
SET_STATUS_Failure( VKI_EMFILE ); |
3298 |
SET_STATUS_Failure( VKI_EMFILE ); |