fdes and port
Shiro Kawai
(24 Jul 2020 07:36 UTC)
|
Re: fdes (now fd) and port
hga@xxxxxx
(16 Aug 2020 11:49 UTC)
|
Re: fdes (now fd) and port
Shiro Kawai
(16 Aug 2020 12:28 UTC)
|
Re: fdes (now fd) and port
John Cowan
(17 Aug 2020 17:05 UTC)
|
Re: fdes (now fd) and port
Shiro Kawai
(17 Aug 2020 20:42 UTC)
|
Re: fdes (now fd) and port Duy Nguyen (06 Sep 2020 13:32 UTC)
|
Re: fdes (now fd) and port
Shiro Kawai
(06 Sep 2020 13:52 UTC)
|
Re: fdes (now fd) and port
John Cowan
(06 Sep 2020 21:11 UTC)
|
Re: fdes (now fd) and port
hga@xxxxxx
(06 Sep 2020 21:20 UTC)
|
Re: fdes (now fd) and port
John Cowan
(06 Sep 2020 21:22 UTC)
|
Re: fdes (now fd) and port
Arthur A. Gleckler
(06 Sep 2020 21:26 UTC)
|
Re: fdes (now fd) and port
Duy Nguyen
(07 Sep 2020 09:09 UTC)
|
Re: fdes (now fd) and port
hga@xxxxxx
(07 Sep 2020 01:07 UTC)
|
Re: fdes (now fd) and port
John Cowan
(07 Sep 2020 02:43 UTC)
|
Re: fdes (now fd) and port
hga@xxxxxx
(07 Sep 2020 12:43 UTC)
|
On Tue, Aug 18, 2020 at 3:42 AM Shiro Kawai <xxxxxx@gmail.com> wrote: > > fd->*-port can't be implemented portably, so each implementation must work on it, interacting with its own port system. I'm not sure if a particular implementation has a difficulty to support either way. > We don't need to worry about ports created by other means, so the implementation doesn't need to change their existing port handling. > > If we have implementations that already have native fd->*-port procedures, but some close fd automatically and others don't, then we have the compatibility problem and can't force either way. Is it the case? (Gauche has an optional argument to specify whether the port "owns" the fd or not; if the port owns it, closing port causes closing fd. So it can support either way.) > > Initially I thought a proper protocol ensures safe closure of ports and fds regardless of the port's ownership of fd Can fd->*-port dup() the file descriptor instead of reusing and then the port owns the new fd? Then a port can and must close its fd when it's closed. The original fd is up to the user to manage. And the OS is in charge of actually closing the in-kernel file object when all associated fds are closed. -- Duy