A user in IRC asked about route exec's exit status which seems a reasonable thing to document.
The text is a combination of .Ex -std and env(1). Also route exec requires a command, so fix the .Op markup. diff --git route.8 route.8 index 887446c1420..ee5bd15fa1a 100644 --- route.8 +++ route.8 @@ -281,7 +281,8 @@ and/or a gateway. .Op Fl T Ar rtable .Tg .Cm exec -.Op Ar command ... +.Ar command +.Op Ar arg ... .Xc Execute a command, forcing the process and its children to use the routing table and appropriate routing domain as specified with the @@ -514,6 +515,44 @@ host and network name database .It Pa /etc/mygate default gateway address .El +.Sh EXIT STATUS +For commands other than +.Cm exec , +the +.Nm +utility exits 0 on success, and >0 if an error occurs. +.Pp +For the +.Cm exec +command the +.Nm +utility exits with one of the following values: +.Bl -tag -width Ds +.It 0 +.Nm +completed successfully and +.Ar command +was invoked and completed successfully too. +.It 1 +An invalid command line option was passed to +.Nm +or setting the routing table failed and +.Ar command +was not invoked, or +.Ar command +was invoked but failed with exit status 1. +.It 2\(en125, 128\(en255 +.Ar command +was invoked but failed with this exit status; +see its manual page for more information. +.It 126 +.Ar command +was found but could not be invoked, or it was invoked but failed +with exit status 126. +.It 127 +.Ar command +could not be found, or it was invoked but failed with exit status 127. +.El .Sh EXAMPLES Show the current IPv4 routing tables, without attempting to print hostnames symbolically: