最新消息:阿啰哈,本人90后,目前单身,欢迎妹子们来撩!.(。→‿←。)

kill和pkill重启一个进程

Commands 林志斌 651浏览

Q. How do I kill a process called inetd or foo and restart the same so that configuration file get updated?
A. Both UNIX and Linux supports POSIX reliable signals and POSIX real-time signals. Each signal has a current disposition, which determines how the process behaves when it is delivered the signal.

Generally following command is used
kill -1 process-pid

First get pid of inetd:
ps -e | grep inetd

Now force read inetd.conf:
kill -1 xinetd-pid

You can also use pkill command used to send signals. The pkill command allows the use of extended regular expression patterns and other matching criteria.
pkill -HUP process-name

Make syslog reread its configuration file
# pkill -HUP syslogd
Make xinetd reread its configuration file
# pkill -HUP inetd

via: http://www.cyberciti.biz/faq/howto-linux-unix-killing-restarting-the-process/

转载请注明:林志斌 » kill和pkill重启一个进程

发表评论
取消评论
表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址