From: Steven E L. <sl...@ma...> - 2001-07-24 16:26:15
|
>[Kostas discovers: open("hsf", "pw") | stop("Can't find the `hsf' program!") >does not call stop() on Solaris even when "hsf" is not a valid program.] > >An interesting question would be: does the stop() get executed on any >platform? Icon pipes are implemented using popen() and the semantics >may vary a bit across UNIXen and other platforms. > >A second interesting question is: should we be so brazen as to do a path >search for the command prior to calling popen()? I don't know whether the >Icon folks decided not to, or if the question didn't come up. If the >requested command were somehow internal to the command shell, it would >not show up on a path search but the popen() might succeed anyhow. But >internal shell commands are obscure and nonportable enough that I'd be >willing to to a path search, possibly special-casing on any platforms >with internal shell commands, if no good arguments against one exist. > >Clint I took a 30 second look at the (probably not most recent) code and frankly I couldn't tell in that time whether the code for pipes ever reaches a fail when there is an error. Most of the other modes (Graphics, Posix, Dbm, Messaging) check the returned file handle and fail inside their block, but Pipe doesn't do that. Steve |