comint-exec-hook is a variable defined in `comint.el'.
Its value is

  • This variable may be risky if used as a file-local variable.

Hook run each time a process is exec'd by `comint-exec'.
This is called after the process is cranked up. It is useful for things that
must be done each time a process is executed in a Comint mode buffer (e.g.,
`(process-kill-without-query)'). In contrast, the `comint-mode-hook' is only
executed once when the buffer is created.

You can customize this variable.