[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#325600: New patch idea



Hallo Tom,

> So you could change the INLINE_SYSCALL from osf_wait4 to sys_wait4 and try
> again (I have no time to do this).

Sorry it must be in this way (copied from x86):

# define waitpid_not_cancel(pid, stat_loc, options) \
  INLINE_SYSCALL (wait4, 4, pid, stat_loc, options, NULL)

Instead of:

# define waitpid_not_cancel(pid, stat_loc, options) \
  INLINE_SYSCALL (osf_wait4, 4, pid, stat_loc, options, NULL)

As a not-wrapped "sys_wait4" is defined in kernel, too.

If this does not help the error with linuxthreads could be some other. The
problem is that the not-inlined "wait4" function (your patch used it) in
glibc is not simple a call to the kernel function. There is some magic
around it. Eventually is this magic missing in the inlined version. Wait4
and getrusage and some others are the only syscalls that are wrapped in
sysdeps in that way.

I this is the case then the usage of the not-inlined version on alpha would
be justified by that. I would them tend to apply this simple one-line patch:

# define waitpid_not_cancel(pid, stat_loc, options) \
  INLINE_SYSCALL (osf_wait4, 4, pid, stat_loc, options, NULL)

To:

# define waitpid_not_cancel(pid, stat_loc, options) \
  wait4(pid, stat_loc, options, NULL)

Uwe




Reply to: