Make do_builtin_io multi-fork safe, moved it to postfork.cpp

Addresses https://github.com/fish-shell/fish-shell/issues/495
This commit is contained in:
ridiculousfish
2013-01-11 15:09:33 -08:00
parent b66233de78
commit 9d6c4fa678
6 changed files with 35 additions and 38 deletions

View File

@@ -105,6 +105,8 @@ static char *wcs2str_internal(const wchar_t *in, char *out);
void show_stackframe()
{
ASSERT_IS_NOT_FORKED_CHILD();
/* Hack to avoid showing backtraces in the tester */
if (program_name && ! wcscmp(program_name, L"(ignore)"))
return;