Same as for the _\bP_\bo_\bl_\bi_\bc_\by _\bp_\bl_\bu_\bg_\bi_\bn _\bA_\bP_\bI.
+ S\bSi\big\bgn\bna\bal\bl h\bha\ban\bnd\bdl\ble\ber\brs\bs
+ The s\bsu\bud\bdo\bo front end installs default signal handlers to trap common
+ signals while the plugin functions are run. The following signals are
+ trapped by default before the command is executed:
+
+ o\bo SIGALRM
+ o\bo SIGHUP
+ o\bo SIGINT
+ o\bo SIGQUIT
+ o\bo SIGTERM
+ o\bo SIGTSTP
+ o\bo SIGUSR1
+ o\bo SIGUSR2
+
+ If a fatal signal is received before the command is executed, s\bsu\bud\bdo\bo will
+ call the plugin's c\bcl\blo\bos\bse\be() function with an exit status of 128 plus the
+ value of the signal that was received. This allows for consistent
+ logging of commands killed by a signal for plugins that log such
+ information in their c\bcl\blo\bos\bse\be() function.
+
+ A plugin may temporarily install its own signal handlers but must restore
+ the original handler before the plugin function returns.
+
H\bHo\boo\bok\bk f\bfu\bun\bnc\bct\bti\bio\bon\bn A\bAP\bPI\bI
Beginning with plugin API version 1.2, it is possible to install hooks
for certain functions called by the s\bsu\bud\bdo\bo front end.
used to merge in environment variables stored in the PAM handle
before a command is run.
+ Version 1.3
+ Support for the _\be_\bx_\be_\bc_\b__\bb_\ba_\bc_\bk_\bg_\br_\bo_\bu_\bn_\bd entry has been added to the
+ command_info list.
+
+ The s\bsu\bud\bdo\bo front end now installs default signal handlers to trap
+ common signals while the plugin functions are run.
+
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
sudoers(4), sudo(1m)
.PP
Same as for the
\fIPolicy plugin API\fR.
+.SS "Signal handlers"
+The
+\fBsudo\fR
+front end installs default signal handlers to trap common signals
+while the plugin functions are run.
+The following signals are trapped by default before the command is
+executed:
+.TP 4n
+\fBo\fR
+\fRSIGALRM\fR
+.PD 0
+.TP 4n
+\fBo\fR
+\fRSIGHUP\fR
+.TP 4n
+\fBo\fR
+\fRSIGINT\fR
+.TP 4n
+\fBo\fR
+\fRSIGQUIT\fR
+.TP 4n
+\fBo\fR
+\fRSIGTERM\fR
+.TP 4n
+\fBo\fR
+\fRSIGTSTP\fR
+.TP 4n
+\fBo\fR
+\fRSIGUSR1\fR
+.TP 4n
+\fBo\fR
+\fRSIGUSR2\fR
+.PD
+.PP
+If a fatal signal is received before the command is executed,
+\fBsudo\fR
+will call the plugin's
+\fBclose\fR()
+function with an exit status of 128 plus the value of the signal
+that was received.
+This allows for consistent logging of commands killed by a signal
+for plugins that log such information in their
+\fBclose\fR()
+function.
+.PP
+A plugin may temporarily install its own signal handlers but must
+restore the original handler before the plugin function returns.
.SS "Hook function API"
Beginning with plugin API version 1.2, it is possible to install
hooks for certain functions called by the
to the user environment which can be updated as needed.
This can be used to merge in environment variables stored in the PAM
handle before a command is run.
+.TP 6n
+Version 1.3
+Support for the
+\fIexec_background\fR
+entry has been added to the
+\fRcommand_info\fR
+list.
+.sp
+The
+\fBsudo\fR
+front end now installs default signal handlers to trap common signals
+while the plugin functions are run.
.SH "SEE ALSO"
sudoers(@mansectform@),
sudo(@mansectsu@)
.Pp
Same as for the
.Sx Policy plugin API .
+.Ss Signal handlers
+The
+.Nm sudo
+front end installs default signal handlers to trap common signals
+while the plugin functions are run.
+The following signals are trapped by default before the command is
+executed:
+.Pp
+.Bl -bullet -compact
+.It
+.Dv SIGALRM
+.It
+.Dv SIGHUP
+.It
+.Dv SIGINT
+.It
+.Dv SIGQUIT
+.It
+.Dv SIGTERM
+.It
+.Dv SIGTSTP
+.It
+.Dv SIGUSR1
+.It
+.Dv SIGUSR2
+.El
+.Pp
+If a fatal signal is received before the command is executed,
+.Nm sudo
+will call the plugin's
+.Fn close
+function with an exit status of 128 plus the value of the signal
+that was received.
+This allows for consistent logging of commands killed by a signal
+for plugins that log such information in their
+.Fn close
+function.
+.Pp
+A plugin may temporarily install its own signal handlers but must
+restore the original handler before the plugin function returns.
.Ss Hook function API
Beginning with plugin API version 1.2, it is possible to install
hooks for certain functions called by the
to the user environment which can be updated as needed.
This can be used to merge in environment variables stored in the PAM
handle before a command is run.
+.It Version 1.3
+Support for the
+.Em exec_background
+entry has been added to the
+.Li command_info
+list.
+.Pp
+The
+.Nm sudo
+front end now installs default signal handlers to trap common signals
+while the plugin functions are run.
.El
.Sh SEE ALSO
.Xr sudoers @mansectform@ ,