()
return json.dumps(public.return_data(True, 'Successful operation!')), json_header
@name 关闭指定命令
        @author hwliang<2021-07-19>
        @param cmdstring<string> 完整命令行
        @return dict
        示例：
            $.post('/close_sock_shell',{cmdstring:'ping www.bt.cn -c 100'})
def close_sock_shell():
    '''
        @name 关闭指定命令
        @author hwliang<2021-07-19>
        @param cmdstring<string> 完整命令行
        @return dict
        示例：
            $.post('/close_sock_shell',{cmdstring:'ping www.bt.cn -c 100'})
    '''
    comReturn = comm.local()
    if comReturn: return comReturn
    args = get_input()
    cmdstring = args.cmdstring.strip()
    skey = public.md5(cmdstring)
    pid = cache.get(skey)
    if not pid:
        return json.dumps(public.return_data(False, [], error_msg='The specified sock has been terminated!')), json_header
    os.kill(pid, 9)
    cache.delete(skey)
    return json.dumps(public.return_data(True, 'Successful operation!')), json_header
def close_sock_shell ( ) : comReturn = comm . local ( ) if comReturn : return comReturn args = get_input ( ) cmdstring = args . cmdstring . strip ( ) skey = public . md5 ( cmdstring ) pid = cache . get ( skey ) if not pid : return json . dumps ( public . return_data ( False , [ ] , error_msg = 'The specified sock has been terminated!' ) ) , json_header os . kill ( pid , 9 ) cache . delete ( skey ) return json . dumps ( public . return_data ( True , 'Successful operation!' ) ) , json_header