bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gawk] problem with TCP/IP internetworking feature


From: Samson Abramsky
Subject: Re: [gawk] problem with TCP/IP internetworking feature
Date: Thu, 21 Aug 2003 11:28:06 +0100 (BST)

Thanks very much for your helpful reply.
The second of your two alternatives worked - the first didn't!
(Since daytime is presumably enabled on your system, and I can obviosuly
open a socket at my end, I wonder why that should be?)

Best wishes,

Samson Abramsky

On Thu, 21 Aug 2003, Stepan Kasal wrote:

>
> On Wed, Aug 20, 2003 at 12:43:47PM +0100, Samson Abramsky wrote:
> > running gawk version 3.1.3
>
> > "/inet/tcp/0/localhost/daytime" |& getline
> > print $0
> > close("/inet/tcp/0/localhost/daytime")
>
> > gawk; foo:2 fatal: can't open two way socket
> > '/inet/tcp/0/localhost/daytime' for input/output (No such file or
> > directory).
>
> > I have verified that `localhost' is present in /etc/hosts, and that
> > `daytime' is present in /etc/services.
>
> Your host doesn't support the daytime service.  You have to try another
> service instead of "daytime".  If there is sendmail or another SMTP
> daemon running on your computer, "smtp" should work.  If you run an
> ftp daemon, try service "ftp".
>
> Or, supposing the computer is connected to the Internet, you can try
> the following:
>
> BEGIN {
> service = "/inet/tcp/0/atrey.karlin.mff.cuni.cz/daytime"
> # service = "/inet/tcp/0/matsrv.math.cas.cz/smtp"
> service |& getline
> print $0
> close(service)
> }
>
> I hope you find at least one working combination.
>
> Back to the original question: in order to be able to contact a TCP port
> ("a service"), the computer has to "listen" on the port.  On Linux and
> other Unix style systems, this usually means that a daemon is running and
> listening on that port.  Your computer doesn't run any daemon listening
> on the "daytime" port.
>
> The gawkinet manual says (about /etc/sevices):
> |    Here, you find a list of services that traditional Unix machines
> | usually support. If your GNU/Linux machine does not do so, it may be
> | that these services are switched off in some startup script. Systems
>
> So, /etc/services is a list of services "Unix machines usually support".
> It's not the list of services the actual machine supports.
>
> Perhaps the wording should be changed to:
>   Here, you find a list of services that Unix machines often support.
>   It depends on the configuration of your GNU/Linux or Unix system,
>   which of them are actually running.
>
> Hope this explains it,
>       Stepan Kasal
>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]