Changeset 3080 for trunk


Ignore:
Timestamp:
Apr 9, 2007, 11:14:07 PM (18 years ago)
Author:
bird
Message:

Don't make big assumptions about the whereabouts of sh on OS/2.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/essentials/sys-apps/gawk/io.c

    r3076 r3080  
    18311831
    18321832                        execl("/bin/sh", "sh", "-c", str, NULL);
     1833#ifdef __EMX__
     1834                        execlp("sh.exe", "sh", "-c", str, NULL);
     1835#endif
    18331836                        _exit(errno == ENOENT ? 127 : 126);
    18341837
     
    19341937        /* stderr does NOT get dup'ed onto child's stdout */
    19351938        pid = spawnl(P_NOWAIT, "/bin/sh", "sh", "-c", str, NULL);
     1939# if 1 /* yea, like everyone has /bin/sh on OS/2. */
     1940        if (pid < 0)
     1941            pid = spawnlp(P_NOWAIT, "sh.exe", "sh", "-c", str, NULL);
     1942# endif
    19361943       
    19371944        /* restore stdin and stdout */
     
    21052112        os_close_on_exec(p[0], cmd, "pipe", "from"); /* pipe output: input of the parent process */
    21062113        os_close_on_exec(save_stdout, cmd, "pipe", "from"); /* saved stdout of the parent process */
    2107        
     2114
    21082115        pid = spawnl(P_NOWAIT, "/bin/sh", "sh", "-c", cmd, NULL);
     2116# if 1 /* yea, like everyone has /bin/sh on OS/2. */
     2117        if (pid < 0)
     2118            pid = spawnlp(P_NOWAIT, "sh.exe", "sh", "-c", cmd, NULL);
     2119# endif
     2120
    21092121       
    21102122        /* restore stdout */
Note: See TracChangeset for help on using the changeset viewer.