Dan Willemsen | 38f2dba | 2016-07-08 14:54:35 -0700 | [diff] [blame] | 1 | // Copyright 2016 The Go Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
Dan Willemsen | bc60c3c | 2021-12-15 01:09:00 -0800 | [diff] [blame] | 5 | // aix, darwin, js/wasm, openbsd and solaris don't implement |
| 6 | // waitid/wait6. netbsd implements wait6, but that is causing test |
| 7 | // failures, see issue #48789. |
| 8 | |
| 9 | //go:build aix || darwin || (js && wasm) || netbsd || openbsd || solaris |
Dan Willemsen | 38f2dba | 2016-07-08 14:54:35 -0700 | [diff] [blame] | 10 | |
| 11 | package os |
| 12 | |
| 13 | // blockUntilWaitable attempts to block until a call to p.Wait will |
Colin Cross | d9c6b80 | 2019-03-19 21:10:31 -0700 | [diff] [blame] | 14 | // succeed immediately, and reports whether it has done so. |
Dan Willemsen | 38f2dba | 2016-07-08 14:54:35 -0700 | [diff] [blame] | 15 | // It does not actually call p.Wait. |
| 16 | // This version is used on systems that do not implement waitid, |
Dan Willemsen | bc60c3c | 2021-12-15 01:09:00 -0800 | [diff] [blame] | 17 | // or where we have not implemented it yet. Note that this is racy: |
| 18 | // a call to Process.Signal can in an extremely unlikely case send a |
| 19 | // signal to the wrong process, see issue #13987. |
Dan Willemsen | 38f2dba | 2016-07-08 14:54:35 -0700 | [diff] [blame] | 20 | func (p *Process) blockUntilWaitable() (bool, error) { |
| 21 | return false, nil |
| 22 | } |