Skip to content

Commit

Permalink
next-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gc00 committed Apr 3, 2021
1 parent ffd42c2 commit 6f0a40a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/nosyscallsreal.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,13 @@ _real_tcgetpgrp(int fd)
REAL_FUNC_PASSTHROUGH_PID_T(tcgetpgrp) (fd);
}

#if 0
pid_t
_real_getpgrp(void)
{
REAL_FUNC_PASSTHROUGH_PID_T(getpgrp) ();
}
#endif

pid_t
_real_setpgrp(void)
Expand Down
9 changes: 9 additions & 0 deletions src/plugin/pid/pid_syscallsreal.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,15 @@ _real_tcgetpgrp(int fd)
return arg;
}

// FIXME: libdmtcp.so:_libc_getpgrp() depends on this.
// It should `call dmtcp_get_libc_addr() instead.
// Remove this _libc_getpgrp() when that works.
pid_t
_libc_getpgrp(void)
{
REAL_FUNC_PASSTHROUGH_TYPED(pid_t, getpgrp) ();
}

LIB_PRIVATE
pid_t
_real_getpgrp(void)
Expand Down
2 changes: 1 addition & 1 deletion src/syscallsreal.c
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ pid_t
_libc_getpgrp()
{
// This introduces a dependence of libdmtcp.so on libdmtcp_pid.so
REAL_FUNC_PASSTHROUGH(_real_getpgrp) ();
REAL_FUNC_PASSTHROUGH(_libc_getpgrp) ();
}

LIB_PRIVATE
Expand Down
2 changes: 1 addition & 1 deletion src/syscallwrappers.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ LIB_PRIVATE extern __thread int thread_performing_dlopen_dlsym;
MACRO(tcgetpgrp) \
MACRO(tcsetpgrp) \
MACRO(getpgrp) \
MACRO(_real_getpgrp) /* src/plugin/pid/pid_syscallsreal.c */ \
MACRO(_libc_getpgrp) /* src/plugin/pid/pid_syscallsreal.c */ \
MACRO(setpgrp) \
\
MACRO(getpgid) \
Expand Down

0 comments on commit 6f0a40a

Please sign in to comment.