mac操作技巧

Mac下关闭irdmi和irdmi2进程的8000端口

Mac下的本机8000端口可能被占用,出现如下错误:
[Errno 48] Address already in use
所以找出占用8000端口的应用程序进程:
lsof -i:8000
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
iSecServe 26455 root 6u IPv6 0x9ababcb067c3b609 0t0 TCP *:8000 (LISTEN)
iSecServe 26455 root 7u IPv4 0x9ababcb08042de09 0t0 TCP *:8000 (LISTEN)
ps -ef|grep 26455

0 26455     1   0 Tue02PM ??         0:00.62 /usr/libexec/cups/backend/iSecServer

这个东西是个服务,所以进入服务管理,将其注释:
vi /etc/services
irdmi2 7999/udp # iRDMI2
irdmi2 7999/tcp # iRDMI2
irdmi 8000/udp # iRDMI
irdmi 8000/tcp # iRDMI