View | Details | Raw Unified | Return to bug 196451
Collapse All | Expand All

(-)coregrind/m_syswrap/syswrap-freebsd.c (-1 / +2 lines)
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 );
(-)include/vki/vki-freebsd.h (+1 lines)
Lines 1543-1548 Link Here
1543
#define VKI_F_SETLK		12	/* set record locking information */
1543
#define VKI_F_SETLK		12	/* set record locking information */
1544
#define VKI_F_SETLKW		13	/* F_SETLK; wait if blocked */
1544
#define VKI_F_SETLKW		13	/* F_SETLK; wait if blocked */
1545
#define VKI_F_SETLK_REMOTE	14	/* debugging support for remote locks */
1545
#define VKI_F_SETLK_REMOTE	14	/* debugging support for remote locks */
1546
#define VKI_F_DUPFD_CLOEXEC	17	/* Like F_DUPFD, but FD_CLOEXEC is set */
1546
1547
1547
/* for F_[GET|SET]FL */
1548
/* for F_[GET|SET]FL */
1548
#define VKI_FD_CLOEXEC	1	/* actually anything with low bit set goes */
1549
#define VKI_FD_CLOEXEC	1	/* actually anything with low bit set goes */

Return to bug 196451