From 099b394784ece6ea85853be156c05ce9d3d40bc5 Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 4 Mar 2005 22:09:53 +0000 Subject: [PATCH] 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 --- src/srfsh/srfsh.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } -- 2.11.0