File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2425,7 +2425,7 @@ def start_ray_client_server(
24252425 stderr_file = stderr_file ,
24262426 fate_share = fate_share ,
24272427 pass_handles = [runtime_env_agent_port_read_handle ]
2428- if runtime_env_agent_port_read_handle
2428+ if runtime_env_agent_port_read_handle is not None
24292429 else None ,
24302430 )
24312431 return process_info
Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ class Pipe {
211211 CloseWriterHandle ();
212212 }
213213
214- // / Parse comma-separated writer handles, set close-on-exec, return as fds .
214+ // / Parse comma-separated handles and set close-on-exec.
215215 static std::vector<intptr_t > ParseHandlesAndSetCloexec (const std::string &handles_str) {
216216 std::vector<intptr_t > result;
217217 if (handles_str.empty ()) return result;
@@ -222,8 +222,8 @@ class Pipe {
222222 if (token.empty ()) continue ;
223223#ifdef _WIN32
224224 intptr_t handle = static_cast <intptr_t >(std::stoll (token));
225- int fd = OpenHandleAsFd ( handle, _O_BINARY | _O_WRONLY );
226- if (fd >= 0 ) result.push_back (static_cast < intptr_t >(fd) );
225+ SetHandleInformation ( reinterpret_cast <HANDLE>( handle), HANDLE_FLAG_INHERIT, 0 );
226+ result.push_back (handle );
227227#else
228228 int fd = std::stoi (token);
229229 SetFdCloseOnExec (fd);
You can’t perform that action at this time.
0 commit comments