diff options
author | Takashi Yano <takashi.yano@nifty.ne.jp> | 2023-09-17 08:32:09 +0900 |
---|---|---|
committer | Takashi Yano <takashi.yano@nifty.ne.jp> | 2023-09-17 21:53:44 +0900 |
commit | 8484773f47ccb14a24e3b40a5b5a329ae5768f82 (patch) | |
tree | 681d51f02192b20eceabb0d852f1fefd86bf6616 | |
parent | c2d2bf34e6959615a3ba0edf4153d210501ba04f (diff) | |
download | newlib-8484773f47ccb14a24e3b40a5b5a329ae5768f82.zip newlib-8484773f47ccb14a24e3b40a5b5a329ae5768f82.tar.gz newlib-8484773f47ccb14a24e3b40a5b5a329ae5768f82.tar.bz2 |
Cygwin: dsp: Fix a bug that app hangs if it killed during write().
If app is killed during blocking write(), it sometimes hangs. This
patch fixes the issue.
Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
-rw-r--r-- | winsup/cygwin/fhandler/dsp.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler/dsp.cc b/winsup/cygwin/fhandler/dsp.cc index 5f78821..03c812a 100644 --- a/winsup/cygwin/fhandler/dsp.cc +++ b/winsup/cygwin/fhandler/dsp.cc @@ -590,7 +590,8 @@ fhandler_dev_dsp::Audio_out::waitforallsent () while (Qisr2app_->query () != fh->fragstotal_) { debug_printf ("%d blocks in Qisr2app", Qisr2app_->query ()); - Sleep (100); + cygwait (1); + sendcurrent (); } } |