From: erickson Date: Fri, 4 Mar 2005 22:09:53 +0000 (+0000) Subject: we don't add 'newlines' to history. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=099b394784ece6ea85853be156c05ce9d3d40bc5;p=opensrf%2Fbjwebb.git we don't add 'newlines' to history. we make sure children exit after finishing so the shell doesn't get forked git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@176 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/srfsh/srfsh.c b/src/srfsh/srfsh.c index 5c2bec1..2ba214d 100644 --- a/src/srfsh/srfsh.c +++ b/src/srfsh/srfsh.c @@ -89,7 +89,9 @@ int main( int argc, char* argv[] ) { char* req_copy = strdup(request); parse_request( req_copy ); - add_history(request); + if( request && strlen(request) > 2 ) { + add_history(request); + } free(request); free(req_copy); @@ -280,6 +282,7 @@ int handle_exec(char* words[]) { } } else { execvp( words[0], words ); + exit(0); } return 1; }