anchor.diff:  	    Res
       end.
   
  +%% This function returns the number of open fds on a system
  +%% and also a string representing more detailed information
  +%% for debugging.
  +%% It only supports linux for now.
  +read_fd_info() ->
  +    ProcFd = "/proc/" ++ os:getpid() ++ "/fd",
  +    case file:list_dir(ProcFd) of
  +        {ok, FDs} ->
  +            {ok, length(FDs), os:cmd("ls -l " ++ ProcFd)};
  +        Error ->
  +            Error
  +    end.
   
   %% Error handler 
   
  
positive.code: 		      {ok, #file_info{size = Size}} =
  			  file:read_file_info(Filename),
  		      {ok,D} = file:open(Filename,[read|FileOpts]),
  		      {ok, Size} = file:sendfile(D, Sock,0,Size,SendfileOpts),
  		      Size
  	      end,
  
  
negative.code: 	    {skip,"Not supported"}
      end;
  init_per_testcase(_TC,Config) ->
      case read_fd_info() of
          {ok, NumFDs, FDDetails} ->
              [{fds,NumFDs},{details,FDDetails}|Config];
          {error,_Reason} ->
              Config
      end.
  
  end_per_testcase(_TC,Config) ->
      case proplists:get_value(fds, Config) of
          undefined ->
              ok;
          NumOldFDs ->
              case read_fd_info() of
                  {ok, NumFDs, FDDetails} when NumFDs =/= NumOldFDs ->
                      ct:log("FDs: ~n~ts~nOldFDs: ~n~ts~n",
                             [FDDetails,proplists:get_value(details,Config)]),
                      {fail,"Too many (or too few) fds open"};
                  _ ->
                      ok
              end
      end.
  
  t_sendfile_small(Config) when is_list(Config) ->
      Filename = proplists:get_value(small_file, Config),
  