Closed mbhall88 closed 6 years ago
Ah. Yep, guess I didn't think of that possibility. I guess the solution would be to do a check at the beginning: if typeof signal === function
and callback === undefined
then set callback = signal
and set signal = 'SIGTERM'
. I ought to be able to do that pretty quickly.
Published in v1.2.0
When using
kill()
, if I pass it thepid
and acallback
, but nosignal
as in this example:I get the following error:
It looks like the function can't handle not being given a signal if it is given a callback function. If I do the same code, but with the default signal
'SIGTERM'
as well, it works fine.I would offer to fix but I don't really know how (would love to learn though).