waitfor

Wait until a path exists

Syntax:

waitfor pathname [wait_time[:poll_ms]]

Options:

pathname
The path to test.
wait_time
The maximum number of seconds to wait for the file to appear. It can include one decimal digit to specify tenths of a second. The default is 5.0 seconds.
poll_ms
The number of milliseconds to wait between checks for the path. The default is 100 milliseconds.

Description:

The waitfor utility pauses temporarily until a stat() on the specified pathname succeeds. It's often used for synchronization, to allow a resource manager to perform its startup functionality, and then for the process manager to proceed with the further interpretation of the script file.

Native io-pkt and ported NetBSD drivers don't put entries into the /dev/io-net namespace, so a waitfor command for such an entry won't work properly in buildfiles or scripts. Use if_up -p instead; for example, instead of waitfor /dev/io-net/en0, use if_up -p en0.

Last modified: 2014-05-14



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus