On 7/13/06, Paulex Yang <[EMAIL PROTECTED]> wrote:
Andrew Zhang wrote: > On 7/13/06, Paulex Yang <[EMAIL PROTECTED]> wrote: >> >> Andrew Zhang wrote: >> > Hello everybody, >> > >> > I plan to implement >> > java.nio.channels.spi.SelectorProvider.inheritedChannel() >> > method. Currently Harmony simply returns null. >> > >> > Spec doesn not specify how to detect inheritedChannel clearly, >> > "Returns the >> > channel inherited from the entity that created this Java virtual >> > machine." >> > "For example, on UNIX systems, the Internet services daemon >> (*inetd*) is >> > used to start programs to service requests when a request arrives >> on an >> > associated network port. In this example, the process that is started, >> > inherits a channel representing a network socket. " >> > >> > As my understanding, what inherited channel does is redirect socket to >> > standard input. Therefore, my solution looks like following: >> Don't need to check the stdout? IIRC inetd redirects both. > > > Paulex, I don't thin it's necessary. Even if stdout/stderr are not > redirected, > > RI still returns inherited channel as long as stdin is redirected on > Linux. OK, thank you. Another question(please forgive me, just for curious), how about only stdout is redirected?
null. :)
>> >> > 1. get standard input file descriptor >> > 2. assert the file descriptor. If it is a socket type descriptor, then >> > returns a channel which wraps the descriptor. >> > >> > I also wrote some samples for ensuring my understanding. It seems >> OK on >> > linux, but not the case on Window. RI always returns null on Windows >> > (maybe >> > because there is no service daemon program on Windows? or my >> > understanding >> > is totally wrong?) >> Any chance to get non-null value if inetd is dummied on Windows? Seems >> some Services for UNIX(SFU) is provided by MS with Windows server 2003, >> which can mimic the inetd behavior[1]. I'm not sure if it applies to >> WinXP, too. >> >> >> [1]http://www.microsoft.com/technet/interopmigration/unix/sfu/intdrutil.mspx >> >> >> > Therefore, I want to hear suggestions from our community, >> > espeically folks experienced in network! >> > >> > Many thanks in advance! >> > >> > Best regards, >> > >> >> >> -- >> Paulex Yang >> China Software Development Lab >> IBM >> >> >> >> --------------------------------------------------------------------- >> Terms of use : http://incubator.apache.org/harmony/mailing.html >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > -- Paulex Yang China Software Development Lab IBM --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Andrew Zhang China Software Development Lab, IBM
