# 使用 Homebrew, MacPorts 安装 wait_on

查看 wait_on 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:wait_on
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install wait_on
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install wait_on
```

  证据: MacPorts ports tree: sysutils/wait_on/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:wait_on
- **软件包管理器:** Homebrew
- **版本:** 1.1
- **来源摘要:** Provides shell scripts with access to kqueue(3)
- **主页:** <https://www.freshports.org/sysutils/wait_on/>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- wait_on (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.1
## 项目历史与用法

`wait_on` is a small FreeBSD-oriented command that exposes file and directory change notifications to shell scripts. It lets scripts sleep until a watched path changes instead of polling in a loop.

### 项目历史

The FreeBSD manual page gives the clearest project history: `wait_on` was written by Andrew Stevenson in January 2002 under FreeBSD 4.4. Its design is tied directly to kqueue, the BSD kernel event-notification facility that had recently made file, directory, and descriptor events available without busy polling.

### 使用方式

The command waits on one or more files or directories and exits when a requested event occurs. The manual gives examples such as watching a mailbox for writes, waiting for files to arrive in an incoming FTP directory, or using `-i` and `-t` so a script can tell which watched path changed or timed out.

Internally, `wait_on` uses kqueue's vnode notifications, including events for writes, extension, deletion, renames, link-count changes, attribute changes, and revocation. That makes it a compact bridge between shell scripting and kernel event delivery on systems with kqueue.

### 为什么软件包爱好者会关心

This is a classic small Unix package: one command, one system primitive, and a clean scripting use case. It is historically interesting because it predates the later wave of cross-platform file-watcher tools and shows early BSD users solving shell automation without periodic `stat` polling.

### 时间线

- January 2002: `wait_on` was written under FreeBSD 4.4 by Andrew Stevenson.
- 2000s onward: the command remained useful as a shell-level wrapper around kqueue file and directory events.

### Related projects

- The closest related primitive is kqueue itself. In the broader file-watching family, `wait_on` overlaps conceptually with inotify-based Linux tools and higher-level cross-platform watchers, but it stays intentionally close to the FreeBSD kernel interface.

### 来源

- <https://man.freebsd.org/cgi/man.cgi?query=kqueue&sektion=2>
- <https://man.freebsd.org/cgi/man.cgi?query=wait_on>
- <https://www.freshports.org/sysutils/wait_on/>


## 安全说明

generalized runtime or code generation signal.

- **Geiger 风险:** yellow / 中
- generalized runtime or code generation signal

## 其他软件包管理器记录

- MacPorts - wait_on: normalized package name match | MacPorts ports tree: sysutils/wait_on/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 相关链接

- [wait-on](https://pkg.so/zh-hans/pkg/npm/wait-on/) - Same normalized package name exists in another local package ecosystem.

## Combined YAML source

View the package source record on GitHub. [combined/wait_on.yml](https://github.com/mxcl/pkgdb/blob/main/combined/wait_on.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
