Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mock wait4 on android using waitpid like on win32 #752

Merged
merged 1 commit into from
Dec 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/unix/lwt_unix.cppo.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2242,7 +2242,7 @@ let has_wait4 = not Sys.win32
external stub_wait4 : Unix.wait_flag list -> int -> int * Unix.process_status * resource_usage = "lwt_unix_wait4"

let do_wait4 flags pid =
if Sys.win32 then
if Sys.win32 || Lwt_config.android then
let pid, status = Unix.waitpid flags pid in
(pid, status, { ru_utime = 0.0; ru_stime = 0.0 })
else
Expand Down Expand Up @@ -2312,7 +2312,7 @@ let waitpid =

let wait4 flags pid =
install_sigchld_handler ();
if Sys.win32 then
if Sys.win32 || Lwt_config.android then
Lwt.return (do_wait4 flags pid)
else
if List.mem Unix.WNOHANG flags then
Expand Down