实际上在我的程序中打开了两个管道,我不知道它们为什么会打开。我想关闭那些,但我不知道有人能建议。创建文件的代码。
while(true)
{
//frequency is -1 for the first time before req is received from netstorm
clientSocket.setSoTimeout((int)socketTimeOut);
try
{
Thread.sleep(10000);
// this is block if there is no line feed(\n) or a carriage return ('\r')
strRecvLine = br.readLine();//here files are opening
Thread.sleep(10000);
if(strRecvLine == null)
{
return CONNECTION_CLOSED;
}
}
catch(SocketTimeoutException e)
{
return INIT_MONITOR;
}
catch(SocketException e)
{
cmonLog.debugLog(className, "tcpRecv", "", "", "Socket exception. Test run may be over, Socket: " + clientSocket.toString());
return CONNECTION_CLOSED;
}
打开的文件
lsof -p 16178 | grep “管道” java 16178 cm0n 241r FIFO 0,8 0t0 58898374 管道 java 16178 cm0n 242w FIFO 0,8 0t0 58898374 管道