Skip to content

Commit 9493310

Browse files
committed
Print shell args if failed to run shell
1 parent 16c8b64 commit 9493310

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ConEmuT.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,7 @@ static void sigfault(int sig)
361361
if (sig == SIGSEGV)
362362
{
363363
write_verbose("\033[%u;40m{PID:%u} Failed to run shell (SIGSEGV)\033[m\r\n", pid?31:33, getpid());
364-
if (!verbose)
365-
print_shell_args();
364+
print_shell_args();
366365
// if we exit immediately, some versions of cygwin/msys will not be able to print our message
367366
sleep(1);
368367
exit(EFAULT);
@@ -460,6 +459,7 @@ void child_err_msg(const char* reason)
460459
}
461460
#endif
462461
write_verbose("\033[30;41m\033[K{PID:%u} %s (%i): %s\033[m\r\n", getpid(), reason ? reason : "<unknown fail>", e, pszErDescr);
462+
print_shell_args();
463463
}
464464

465465
static int resize_pty(int pty, struct winsize *winp)
@@ -1319,7 +1319,7 @@ int main(int argc, char** argv)
13191319
}
13201320
else
13211321
{
1322-
write_verbose("\033[31;40m\033[K{PID:%u} Unknown switch: %s\033[m\r\n", getpid(), cur_argv[0]);
1322+
printf("{PID:%u} Unknown switch: %s\r\n", getpid(), cur_argv[0]);
13231323
exit(255);
13241324
}
13251325

0 commit comments

Comments
 (0)