System.Posix.Process.executeFile question
Hi, I'm wondering what the second argument to 'executeFile' is. It's not clear from the documentation. http://www.haskell.org/ghc/docs/latest/html/libraries/unix/System-Posix-Proc... Also, it seems the documentation source is being parsed incorrectly. This is what it looks like to me: executeFile :: FilePath -> Bool -> [String] -> Maybe [(String, String)] -> IO () literal>executeFile cmd args env</literal calls one of the function>execv*</function family, depending on whether or not the current PATH is to be searched for the command, and whether or not an environment is provided to supersede the process's current environment. The basename (leading directory names suppressed) of the command is passed to function>execv*</function> as <varname>arg[0]</varname; the argument list passed to function>executeFile</function therefore begins with varname>arg[1]</varname Thanks! Frederik -- http://ofb.net/~frederik/
That's the bit about 'whether or not the current PATH is to be searched'. True means use the search path. Frederik Eaton wrote:
Hi,
I'm wondering what the second argument to 'executeFile' is. It's not clear from the documentation.
http://www.haskell.org/ghc/docs/latest/html/libraries/unix/System-Posix-Proc...
Also, it seems the documentation source is being parsed incorrectly. This is what it looks like to me:
executeFile :: FilePath -> Bool -> [String] -> Maybe [(String, String)] -> IO () literal>executeFile cmd args env</literal calls one of the function>execv*</function family, depending on whether or not the current PATH is to be searched for the command, and whether or not an environment is provided to supersede the process's current environment. The basename (leading directory names suppressed) of the command is passed to function>execv*</function> as <varname>arg[0]</varname; the argument list passed to function>executeFile</function therefore begins with varname>arg[1]</varname
Thanks!
Frederik
OK, I thought so. Is this the wrong mailing list for bugs in the documentation though? There is the markup problem, and it also says "executeFile cmd args env" rather than "executeFile cmd usePath args env". Frederik On Tue, Aug 08, 2006 at 03:56:59PM -0700, Clifford Beshers wrote:
That's the bit about 'whether or not the current PATH is to be searched'. True means use the search path.
Frederik Eaton wrote:
Hi,
I'm wondering what the second argument to 'executeFile' is. It's not clear from the documentation.
http://www.haskell.org/ghc/docs/latest/html/libraries/unix/System-Posix-Proc...
Also, it seems the documentation source is being parsed incorrectly. This is what it looks like to me:
executeFile :: FilePath -> Bool -> [String] -> Maybe [(String, String)] -> IO () literal>executeFile cmd args env</literal calls one of the function>execv*</function family, depending on whether or not the current PATH is to be searched for the command, and whether or not an environment is provided to supersede the process's current environment. The basename (leading directory names suppressed) of the command is passed to function>execv*</function> as <varname>arg[0]</varname; the argument list passed to function>executeFile</function therefore begins with varname>arg[1]</varname
Thanks!
Frederik
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries
Frederik Eaton wrote:
OK, I thought so. Is this the wrong mailing list for bugs in the documentation though?
This is a good place for bug reports related to library documentation. You could also use GHC's Trac bug database at http://hackage.haskell.org/trac/ghc, as long as the library in question isn't primarily maintained by someone else. I've already made a ticket for the markup problems in the unix library docs. Cheers, Simon
participants (3)
-
Clifford Beshers -
Frederik Eaton -
Simon Marlow