title: How can i get the return code of a killed process in unix?
body: <p>I have a bash script where i kill a running process by sending the SIGTERM signal to it's process ID. However, i want to know the return code of the process i just sent the signal. </p>
  
  <p>Is that possible?</p>
  
  <p>i cannot use 'wait' because the process to kill was not started from my script and i'm receiving 
  "pid ##### is not a child of this shell"</p>
  
  <p>I did some tests in a command line, in a console where the process was running, after i send the SIGTERM signal (from another console), i checked the exit code and it was 143.
  I want to kill the process from a different script and catch that number.</p>