(self, fd)
return True
Closes the given file descriptor (an AST).
        Returns whether the operation succeeded (a concrete boolean)
Closes the given file descriptor (an AST).
        Returns whether the operation succeeded (a concrete boolean)
Closes the given file descriptor ( an AST ) . Returns whether the operation succeeded ( a concrete boolean )
def close(self, fd):
        """
        Closes the given file descriptor (an AST).
        Returns whether the operation succeeded (a concrete boolean)
        """
        try:
            fd = self.state.solver.eval_one(fd)
        except SimSolverError:
            l.error("Trying to close a symbolic file descriptor")
            return False

        if fd not in self.fd:
            l.info("Trying to close an unopened file descriptor")
            return False

        self.state.history.add_event('fs_close', fd=fd, close_idx=len(self.closed_fds))
        self.closed_fds.append((fd, self.fd[fd]))

        del self.fd[fd]
        return True
def close ( self , fd ) : try : fd = self . state . solver . eval_one ( fd ) except SimSolverError : l . error ( "Trying to close a symbolic file descriptor" ) return False if fd not in self . fd : l . info ( "Trying to close an unopened file descriptor" ) return False self . state . history . add_event ( 'fs_close' , fd = fd , close_idx = len ( self . closed_fds ) ) self . closed_fds . append ( ( fd , self . fd [ fd ] ) ) del self . fd [ fd ] return True