更新时间:2023-02-26 17:55:42
下面,保存并在你的shell试试这个脚本(kill_ipcs.sh):
Here, save and try this script (kill_ipcs.sh) on your shell:
#!/bin/bash
ME=`whoami`
IPCS_S=`ipcs -s | egrep "0x[0-9a-f]+ [0-9]+" | grep $ME | cut -f2 -d" "`
IPCS_M=`ipcs -m | egrep "0x[0-9a-f]+ [0-9]+" | grep $ME | cut -f2 -d" "`
IPCS_Q=`ipcs -q | egrep "0x[0-9a-f]+ [0-9]+" | grep $ME | cut -f2 -d" "`
for id in $IPCS_M; do
ipcrm -m $id;
done
for id in $IPCS_S; do
ipcrm -s $id;
done
for id in $IPCS_Q; do
ipcrm -q $id;
done
我们使用它时,我们运行大学生服务器IPCS程序。有些人总是不清理所以...它的需要:P
We use it whenever we run IPCS programs in the university student server. Some people don't always cleanup so...it's needed :P