-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME
46 lines (31 loc) · 1.38 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
AFTER(1) General Commands Manual AFTER(1)
NAME
after - after process dies echo a string to standard output
SYNOPSIS
after [-h] [-v] [-p pid | -n program_name] -e string
DESCRIPTION
after watches the process list for the given pid or program_name. When
the process is no longer in the process list after outputs -e string to
standard output. If both pid and program_name are specified after will
default to watching the process specified by program_name.
In the case of using program_name if there are multiple programs with
this name running all of them will have to exit before after will echo
string.
OPTIONS
-p pid Watch pid.
-n program_name
Watch program_name.
-h Show usage information.
-v Be verbose.
EXAMPLES
Following are some examples to illustrate how after could be useful (or
not).
Notify when your compiler has finished running:
$ after -n clang -e "build is finished!"
The power of this simple tool can be observed when the output is piped
into other programs. For instance; putting your machine to sleep after
your update script has finished running:
$ after -p 2027 -e "doas zzz" | sh
SEE ALSO
kvm_getprocs(3), kvm_open(3)
OpenBSD 6.8 January 5, 2021 OpenBSD 6.8