1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* process.c (rb_fork): don't propagete an error message if error

buffer not given.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2008-12-23 13:59:10 +00:00
parent 423bbf80d5
commit b317b345e8
2 changed files with 9 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Tue Dec 23 22:57:48 2008 Tanaka Akira <akr@fsij.org>
* process.c (rb_fork): don't propagete an error message if error
buffer not given.
Tue Dec 23 21:55:05 2008 Tanaka Akira <akr@fsij.org>
* process.c (rb_fork): propagete an error message from child to parent.

View file

@ -2477,8 +2477,10 @@ rb_fork(int *status, int (*chfunc)(void*, char *, size_t), void *charg, VALUE fd
#ifdef FD_CLOEXEC
err = errno;
write(ep[1], &err, sizeof(err));
errmsg[errmsg_buflen-1] = '\0';
write(ep[1], errmsg, strlen(errmsg));
if (errmsg && 0 < errmsg_buflen) {
errmsg[errmsg_buflen-1] = '\0';
write(ep[1], errmsg, strlen(errmsg));
}
#endif
#if EXIT_SUCCESS == 127
_exit(EXIT_FAILURE);