Skip to content
/ after Public

echo a string to stdout after a specified process exits (OpenBSD)

License

Notifications You must be signed in to change notification settings

e-zk/after

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

echo a string to stdout after a specified process exits (OpenBSD)

Topics

Resources

License

Stars

Watchers

Forks