mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-31 20:31:19 -03:00
Event handling and job reaping updates
darcs-hash:20051011192343-ac50b-aa3f5ae5e2b34d122f10e3b59ceb6fdd447f4ae3.gz
This commit is contained in:
@@ -163,9 +163,20 @@ void read_message( connection_t *src )
|
||||
{
|
||||
if( res == L'\n' )
|
||||
{
|
||||
parse_message( (wchar_t *)src->input.buff, src );
|
||||
/*
|
||||
Before calling parse_message, we must empty reset
|
||||
everything, since the callback function could
|
||||
potentially call read_message.
|
||||
*/
|
||||
|
||||
wchar_t *msg = wcsdup( (wchar_t *)src->input.buff );
|
||||
sb_clear( &src->input );
|
||||
memset (&src->wstate, '\0', sizeof (mbstate_t));
|
||||
memset (&src->wstate, '\0', sizeof (mbstate_t));
|
||||
|
||||
|
||||
parse_message( msg, src );
|
||||
free( msg );
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -203,7 +214,7 @@ static void parse_message( wchar_t *msg,
|
||||
connection_t *src )
|
||||
{
|
||||
debug( 2, L"parse_message( %ls );", msg );
|
||||
|
||||
|
||||
if( msg[0] == L'#' )
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user