Casper.Dik at Sun.COM wrote:
> >Dan Mick wrote:
> >[CC:'ing ksh93-integration-discuss at opensolaris.org]
> >> Someone just noticed that sleep hangs if the network is down.
> >
> >Can you send a stacktrace of the hanging "sleep", please ?
> >
> >> because, of course, it's doing a nameservice lookup.  Of course sleep is.  
> >> Why
> >> wouldn't it?
> >
> >Uhm... ksh93 has builtin networking functionality for UDP/TCP/SCTP but
> >AFAIK this is a completely different codepath which the ksh93 "sleep"
> >builtin never uses...
> >
> >> Um, I'm guessing this is another artifact of being a ksh93 builtin?  Does 
> >> this
> >> strike anyone else as a rather large liability of such tricks?
> >
> >What do you mean ? AFAIK the "sleep" builtin shouldn't do that...
> 
> Clearly it does:
> 
> truss -t open sleep 1
> open("/bin/.paths", O_RDONLY)                   Err#2 ENOENT
> open("/usr/sbin/.paths", O_RDONLY)              Err#2 ENOENT
> open("/usr/ccs/bin/.paths", O_RDONLY)           Err#2 ENOENT
> open("/usr/openwin/bin/.paths", O_RDONLY)       Err#2 ENOENT
> open("/usr/openwin/demo/.paths", O_RDONLY)      Err#2 ENOENT
> open("/usr/ucb/.paths", O_RDONLY)               Err#2 ENOENT
> open("/usr/lib/nis/.paths", O_RDONLY)           Err#2 ENOENT
> open("/opt/etc/.paths", O_RDONLY)               Err#2 ENOENT
> open("/etc/.paths", O_RDONLY)                   Err#2 ENOENT
> open("/usr/lib/.paths", O_RDONLY)               Err#2 ENOENT

The ".paths" lookups coming from the attempt of the shell to load
configuration data for binary plugins.

> open("/var/run/name_service_door", O_RDONLY)    = 3
[snip]
> Why?

http://mail.opensolaris.org/pipermail/ksh93-integration-discuss/2009-February/006975.html
has an explanation of the problem. Or short: The shell sees the '~'
character and does some proactive work which isn't needed.

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)

Reply via email to