Otherwise it is not clear whether $! will be set or not. This way, `/Co-proc<enter>' brings me to *all* relevant spots in the manual.
Snippet to demonstrate how $! is set for an asynchronous process: $ ksh -c ': |& echo $!' 67163 FWIW, sh(1) doesn't document Co-processes (whis is fine/correct) and bash(1) says this about $!: ! Expands to the process ID of the job most recently placed into the background, whether executed as an asynchronous command or using the bg builtin (see JOB CONTROL below). Feedback? OK? Index: ksh.1 =================================================================== RCS file: /cvs/src/bin/ksh/ksh.1,v retrieving revision 1.209 diff -u -p -r1.209 ksh.1 --- ksh.1 7 Jul 2020 10:33:58 -0000 1.209 +++ ksh.1 1 Aug 2020 15:50:04 -0000 @@ -1247,8 +1247,9 @@ The following special parameters are imp set directly using assignments: .Bl -tag -width "1 ... 9" .It Ev \&! -Process ID of the last background process started. -If no background processes have been started, the parameter is not set. +Process ID of the last background process or asynchronous process (Co-process) +started. +If no processes have been started, the parameter is not set. .It Ev \&# The number of positional parameters ($1, $2, etc.). .It Ev \&$