Project

General

Profile

« Previous | Next » 

Revision 91e4e240

Added by mame (Yusuke Endoh) over 5 years ago

internal/process.h: add a no-warning simple wrapper for fork(2)

As fork(2) is deprecated, its calls must be guarded by
COMPILER_WARNING_IGNORED(-Wdeprecated-declarations).
All usages of fork(2) in process have been alread guarded. A new call
to fork(2) was added in ruby.c with f22c4ff359498ab342e4b6d6feb21af6004ee270.
This caused a build failure on Solaris 11.

It may hide a bug to guard big code unnecessarily, so this change
introduces a simple wrapper "rb_fork" whose definition is guarded, and
replaces all calls to fork(2) with the wrapper function.