Don't use posix_spawn for commands that need to be put into foreground to avoid a race

Fix for race where a command's output may not be fully drained
This commit is contained in:
ridiculousfish
2012-11-04 15:45:52 -08:00
parent e46324ced9
commit 5e371e8fe7
4 changed files with 28 additions and 14 deletions

View File

@@ -644,8 +644,6 @@ void reader_write_title()
*/
static void exec_prompt()
{
size_t i;
wcstring_list_t prompt_list;
if( data->prompt.size() )
@@ -664,7 +662,7 @@ static void exec_prompt()
data->prompt_buff.clear();
for( i = 0; i < prompt_list.size(); i++ )
for( size_t i = 0; i < prompt_list.size(); i++ )
{
if (i > 0) data->prompt_buff += L'\n';
data->prompt_buff += prompt_list.at(i);