Ignore:
Timestamp:
Aug 28, 2016, 5:31:02 PM (9 years ago)
Author:
bird
Message:

kmk: kSubmit is mostly done.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/kmkbuiltin.c

    r2591 r2843  
    4343#endif
    4444
    45 int kmk_builtin_command(const char *pszCmd, char ***ppapszArgvToSpawn, pid_t *pPidSpawned)
     45int kmk_builtin_command(const char *pszCmd, struct child *pChild, char ***ppapszArgvToSpawn, pid_t *pPidSpawned)
    4646{
    4747    int         argc;
     
    155155     */
    156156    if (!*pszCmd)
    157         rc = kmk_builtin_command_parsed(argc, argv, ppapszArgvToSpawn, pPidSpawned);
     157        rc = kmk_builtin_command_parsed(argc, argv, pChild, ppapszArgvToSpawn, pPidSpawned);
    158158    else
    159159        rc = 1;
     
    167167
    168168
    169 int kmk_builtin_command_parsed(int argc, char **argv, char ***ppapszArgvToSpawn, pid_t *pPidSpawned)
     169int kmk_builtin_command_parsed(int argc, char **argv, struct child *pChild, char ***ppapszArgvToSpawn, pid_t *pPidSpawned)
    170170{
    171171    const char *pszCmd = argv[0];
    172     int         iumask;
     172    int         iUmask;
    173173    int         rc;
    174174
     
    184184
    185185    /*
    186      * String switch on the command.
    187      */
    188     iumask = umask(0);
    189     umask(iumask);
     186     * String switch on the command (frequent stuff at the top).
     187     */
     188    iUmask = umask(0);
     189    umask(iUmask);
    190190    if (!strcmp(pszCmd, "append"))
    191191        rc = kmk_builtin_append(argc, argv, environ);
     
    198198    else if (!strcmp(pszCmd, "kDepIDB"))
    199199        rc = kmk_builtin_kDepIDB(argc, argv, environ);
     200#ifdef KBUILD_OS_WINDOWS
     201    else if (!strcmp(pszCmd, "kSubmit"))
     202        rc = kmk_builtin_kSubmit(argc, argv, environ, pChild, pPidSpawned);
     203#endif
    200204    else if (!strcmp(pszCmd, "mkdir"))
    201205        rc = kmk_builtin_mkdir(argc, argv, environ);
     
    239243     */
    240244    g_progname = "kmk";                 /* paranoia, make sure it's not pointing at a freed argv[0]. */
    241     umask(iumask);
     245    umask(iUmask);
    242246
    243247
     
    261265
    262266        *ppapszArgvToSpawn = NULL;
    263         rc = kmk_builtin_command_parsed(argc_new, argv_new, ppapszArgvToSpawn, pPidSpawned);
     267        rc = kmk_builtin_command_parsed(argc_new, argv_new, pChild, ppapszArgvToSpawn, pPidSpawned);
    264268
    265269        free(argv_new[0]);
Note: See TracChangeset for help on using the changeset viewer.