From owner-freebsd-questions Mon Apr 14 05:25:21 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id FAA08253 for questions-outgoing; Mon, 14 Apr 1997 05:25:21 -0700 (PDT) Received: from mail.EUnet.hu (www.eunet.hu [193.225.28.100]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id FAA08247 for ; Mon, 14 Apr 1997 05:25:16 -0700 (PDT) Received: by mail.EUnet.hu, id OAA13878; Mon, 14 Apr 1997 14:23:34 +0200 Received: (from zgabor@localhost) by CoDe.hu (8.7.5/8.7.3) id NAA00909; Fri, 11 Apr 1997 13:27:23 +0200 (MET DST) From: Zahemszky Gabor Message-Id: <199704111127.NAA00909@CoDe.hu> Subject: Re: HylaFAX broken on 2.2.0-R? To: freebsd-questions@freebsd.org (FreeBSD questions) Date: Fri, 11 Apr 1997 13:27:23 +0200 (MET DST) Cc: scotto@remuda.com In-Reply-To: from Scott Overholser at "Apr 4, 97 11:40:41 pm" X-Mailer: ELM [version 2.4ME+ PL11 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > just figured this out. runMake and some other functions "return" > explicitly. apparently return returns it's own exit status. after > removing the return statements from captureX(), capture(), runMake(), and > runMakeX(), the configure script ran perfectly - and the code built too. > > my only question now is why didn't /bin/sh behave similarly in 2.1.x? Sorry, I haven't got time to read my mails. So you've found the answer, but if it is true, it's a bug in /bin/sh. The ``return'' command has to return the status of the previous command, if return hasn't got a parameter. So try it: $ sh $ f() return 78 $ g() { f return } $ h() { f } $ f ; echo $? 78 # this is the correct answer $ g ; echo $? 78 # this is the correct answer $ h ; echo $? 78 # this is the correct answer $ exit If you got anything other than three 78's, send the bug report to freebsd-bugs(?). Bye, Gabor --- #!/bin/ksh trap 'rm -f /tmp/$$.$$' EXIT HUP INT QUIT TERM&&print '21N16I25C25E30, 40M30E33E25T15U!'>/tmp/$$.$$&&IFS=' ABCDEFGHIJKLMNOPQRSTUVWXYZ '&&set -A X $(