Re: (machine-instance) possibly blocking execution
Sam Steingold <[email protected]>
| Newsgroups | gmane.lisp.clisp.general |
|---|---|
| Message-ID | <[email protected]> |
> * Jean Louis <[email protected]> [2017-01-02 09:46:39 +0300]: > > I have noticed that (machine-instance) on a computer without Internet > connection, or where Internet was enabled, but on the router the > forwarding was disabled, was blocking the execution of the command, > possibly indefinitely. It was just waiting. > > When Internet on the routing computer was enabled for the internal > computer, the command could run properly. > > I guess that it is using DNS in background, but I cannot know it. Indeed machine-instance calls gethostbyname() on the first invocation. I don't think this is wrong: gethostbyname() taking non-trivial time is a sign of a system problem: either mis-configuration or an temporary connection problem. You can disable this feature by editing socket.d:machine_instance: --8<---------------cut here---------------start------------->8--- diff -r 3e5919c338db src/socket.d --- a/src/socket.d Fri Nov 11 18:19:42 2016 +0100 +++ b/src/socket.d Tue Jan 03 10:33:06 2017 -0500 @@ -131,7 +131,7 @@ LISPFUNN(machine_instance,0) var char host[MAXHOSTNAMELEN+1]; get_hostname(host); result = asciz_to_string(host,O(misc_encoding)); /* hostname as result */ - #ifdef HAVE_GETHOSTBYNAME + #ifdef HAVE_GETHOSTBYNAME_DISABLE pushSTACK(result); /* hostname as 1st string */ { var uintC stringcount = 1; --8<---------------cut here---------------end--------------->8--- -- Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1504 http://steingoldpsychology.com http://www.childpsy.net https://jihadwatch.org http://camera.org http://americancensorship.org Binaries die but source code lives forever. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ clisp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/clisp-list