[erlang-questions] who owns an open file

Ulf Wiger (TN/EAB) <>
Thu Mar 22 10:00:41 CET 2007


Mats Cronqvist:
> 
>    trying to outdo me in the Horrible One-Liner Competition? Hah!
> 
>  
> [{process_info(Pid,monitors),ets:lookup(file_io_servers,Pid)}|
> |[{name,"efile"},{links,[Pid]}|_]<-[erlang:port_info(P) 
> || P <- erlang:ports()]].

I pronounce that my solution was more horrible than yours.  (:

(I'd actually missed process_info(P,monitors). 
I just assumed that it didn't exist. I obviously haven't
read TFM closely enough.)

BR,
Ulf W




More information about the erlang-questions mailing list