Fixed issue 401: os.system() hangs on Mac OS X.

Fixed by falling back to using 'waitpid' instead of 'waitid'.

BUG=http://code.google.com/p/v8/issues/detail?id=401

Review URL: http://codereview.chromium.org/149450

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2424 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 726c29c0
...@@ -370,7 +370,11 @@ static Handle<Value> GetStdout(int child_fd, ...@@ -370,7 +370,11 @@ static Handle<Value> GetStdout(int child_fd,
// whether it exited normally. In the common case this doesn't matter because // whether it exited normally. In the common case this doesn't matter because
// we don't get here before the child has closed stdout and most programs don't // we don't get here before the child has closed stdout and most programs don't
// do that before they exit. // do that before they exit.
#if defined(WNOWAIT) && !defined(ANDROID) //
// We're disabling usage of waitid in Mac OS X because it doens't work for us:
// a parent process hangs on waiting while a child process is already a zombie.
// See http://code.google.com/p/v8/issues/detail?id=401.
#if defined(WNOWAIT) && !defined(ANDROID) && !defined(__APPLE__)
#define HAS_WAITID 1 #define HAS_WAITID 1
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment