Usually, when the shell returns a status code above 128, it means that the process was killed by a signal. Subtract 128 to get the signal number. Your kill command was killed by signal 1, which is HUP.
`pkill` takes care never to kill itself. But it matched its parent, the `sudo` process.
There are several ways to avoid this:
* Use `pkill -x` to consider only exact matches and not substrings (recommended if possible, this is the best way to avoid spurious matches).
* Don't use the `-f` option.
* (Last resort) Write a pattern that doesn't match itself, e.g. `"[n]ginx: master process"`.