Thanks David and Phil for the information and suggestion. Since it's not straightforward in SML I'm working around having to do it at all. (For context, I was trying to use the open file descriptor that refers to a listening socket that the FastCGI spec says an application is given on startup.)
On Fri, 3 Aug 2018 at 04:08, Phil Clayton <phil.clay...@veonix.com> wrote: > Would it help if you could derive a path from the file descriptor? It's > horribly OS-specific: > > https://stackoverflow.com/questions/1188757/getting-filename-from-file-descriptor-in-c > > Phil > > On 02/08/18 08:55, David Matthews wrote: > > I don't think it's possible to create a socket from a file descriptor in > > ML. While they are the same in Unix they are different in Windows. It's > > possible to go the other way using Socket.ioDesc. Maybe someone else > > will have a solution. > > > > David > > > > On 01/08/2018 23:19, Ramana Kumar wrote: > >> Hi Poly/ML, > >> > >> Is it possible to retrieve a socket from a file descriptor in Standard > ML > >> or Poly/ML? > >> > >> E.g., if Posix.FileSys.ST.isSock (Posix.FileSys.fstat fd) is true, then > >> what can I do to fd to use functions in the Socket structure on it? > >> > >> Cheers, > >> Ramana > >> > >> > >> > >> _______________________________________________ > >> polyml mailing list > >> polyml@inf.ed.ac.uk > >> http://lists.inf.ed.ac.uk/mailman/listinfo/polyml > >> > > _______________________________________________ > > polyml mailing list > > polyml@inf.ed.ac.uk > > http://lists.inf.ed.ac.uk/mailman/listinfo/polyml > > > _______________________________________________ > polyml mailing list > polyml@inf.ed.ac.uk > http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
_______________________________________________ polyml mailing list polyml@inf.ed.ac.uk http://lists.inf.ed.ac.uk/mailman/listinfo/polyml