In Dave
Taylor's
Analysis
article in the November 2012
issue, he was using ps to check
to see whether a process was
running before sending a signal for
termination, as in the snippet below: kill -ALRM $$
fi
As an alternative to ps ..., he might
want to use kill -0 $$. The -Ø option
is designed to give an exit code that
shows whether a signal can be sent.
I learned this from some good folks I used
to work with. Thanks for the article.
-Paul
Dave Taylor replies: Nice solution,
Paul. Thanks for sharing it!
Taylor's
Analysis
article in the November 2012
issue, he was using ps to check
to see whether a process was
running before sending a signal for
termination, as in the snippet below: kill -ALRM $$
fi
As an alternative to ps ..., he might
want to use kill -0 $$. The -Ø option
is designed to give an exit code that
shows whether a signal can be sent.
I learned this from some good folks I used
to work with. Thanks for the article.
-Paul
Dave Taylor replies: Nice solution,
Paul. Thanks for sharing it!
Aucun commentaire:
Enregistrer un commentaire