Index: win32-nat.c =================================================================== RCS file: /cvs/src/src/gdb/win32-nat.c,v retrieving revision 1.56 diff -r1.56 win32-nat.c 126c126,127 < static DWORD main_thread_id; /* Thread ID of the main thread */ --- > static DWORD main_thread_id; /* Thread ID of the main thread */ > static pid_t cygwin_pid; /* pid of cygwin process */ 142,144d142 < /* Path to shell */ < static char shell[MAX_PATH + 1]; < 1463a1462,1463 > char shell[MAX_PATH + 1]; /* Path to shell */ > const char *sh; 1471c1471 < if (!useshell || !shell[0]) --- > if (!useshell) 1479,1480c1479,1485 < char *newallargs = alloca (sizeof (" -c 'exec '") + strlen (exec_file) < + strlen (allargs) + 2); --- > char *newallargs; > sh = getenv ("SHELL"); > if (!sh) > sh = "/bin/sh"; > cygwin_conv_to_win32_path (sh, shell); > newallargs = alloca (sizeof (" -c 'exec '") + strlen (exec_file) > + strlen (allargs) + 2); 1500c1505 < /* This code use to assume all env vars were file names and would --- > /* This code used to assume all env vars were file names and would 1816d1820 < const char *sh; 1823,1836d1826 < < sh = getenv ("SHELL"); < if (!sh) < sh = "/bin/sh"; < if (access (sh, X_OK) != 0) < { < shell[0] = '\0'; < useshell = 0; < } < else < { < cygwin_conv_to_win32_path (sh, shell); < useshell = 1; < }