after

Echo a string after process dies
git clone _git@git.zakaria.org/after.git
Log | Files | Refs | README | LICENSE

README (1418B)


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