Ignore:
Timestamp:
Apr 14, 2014, 4:19:42 AM (11 years ago)
Author:
bird
Message:

libc-0.6: system() and popen() should use the same shells, preferablly /bin/sh when available (see unix spec). arg[0] shouldn't have a path, according to unix tradition (should be 'sh' to be more precise). Introduced a backend API for finding the desired shell and figure arguments. Fixes #287.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/libc-0.6/src/emx/include/InnoTekLIBC/backend.h

    r3817 r3859  
    10421042/** When this flag is set, the exec / spawn backend will handle PC batch scripts. */
    10431043extern int __libc_Back_gfProcessHandlePCBatchScripts;
     1044
     1045/**
     1046 * Gets the default shell for functions like system() and popen().
     1047 *
     1048 * @returns 0 on success, negative error number on failure.
     1049 * @param   pszShell        Where to put the path to the shell.
     1050 * @param   cbShell         The size of the buffer @a pszShell points to.
     1051 * @param   poffShellArg    Where to return the offset into @a pszShell of the
     1052 *                          first argument.  The system() and popen() calls has
     1053 *                          traditionally not included the path to /bin/sh.
     1054 * @param   pszCmdLineOpt   Where to put the shell option for specifying a
     1055 *                          command line it should execute.
     1056 * @param   cbCmdLineOpt    The size of the buffer @a pszCmdLineOpt points to.
     1057 */
     1058int __libc_Back_processGetDefaultShell(char *pszShell, size_t cbShell, size_t *poffShellArg,
     1059                                       char *pszCmdLineOpt, size_t cbCmdLineOpt);
    10441060
    10451061/** @} */
Note: See TracChangeset for help on using the changeset viewer.