jehanne: implement waitpid
This commit is contained in:
parent
0b7628ec51
commit
76d7e7039c
|
@ -81,7 +81,8 @@ struct Dir {
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#define __CYGWIN__
|
#include <sys/wait.h>
|
||||||
|
#define __CYGWIN__ /* needed for O_ACCMODE */
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#undef __CYGWIN__
|
#undef __CYGWIN__
|
||||||
|
|
||||||
|
@ -172,6 +173,7 @@ initialize_newlib(void)
|
||||||
libposix_translate_open(open_translator);
|
libposix_translate_open(open_translator);
|
||||||
libposix_set_signal_trampoline(signal_trampoline);
|
libposix_set_signal_trampoline(signal_trampoline);
|
||||||
libposix_translate_error(default_error_translator, 0);
|
libposix_translate_error(default_error_translator, 0);
|
||||||
|
libposix_set_wait_options(0, WNOHANG, 0);
|
||||||
|
|
||||||
/* error numbers */
|
/* error numbers */
|
||||||
libposix_define_errno(PosixE2BIG, E2BIG);
|
libposix_define_errno(PosixE2BIG, E2BIG);
|
||||||
|
|
|
@ -172,6 +172,13 @@ _wait_r(struct _reent *r, int *status)
|
||||||
return POSIX_wait(errnop, status);
|
return POSIX_wait(errnop, status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pid_t
|
||||||
|
waitpid (pid_t reqpid, int *status, int options)
|
||||||
|
{
|
||||||
|
int *errnop = &_REENT->_errno;
|
||||||
|
return POSIX_waitpid(errnop, reqpid, status, options);
|
||||||
|
}
|
||||||
|
|
||||||
long
|
long
|
||||||
_write_r(struct _reent *r, int fd, const void *buf, size_t len)
|
_write_r(struct _reent *r, int fd, const void *buf, size_t len)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue