From owner-freebsd-questions Tue May 29 14:36:26 2001 Delivered-To: freebsd-questions@freebsd.org Received: from itouch.co.nz (itouch.co.nz [203.99.66.188]) by hub.freebsd.org (Postfix) with ESMTP id 89D8337B423 for ; Tue, 29 May 2001 14:36:22 -0700 (PDT) (envelope-from jonc@itouch.co.nz) Received: (from jonc@localhost) by itouch.co.nz (8.11.3/8.11.1) id f4TLaD697173; Wed, 30 May 2001 09:36:13 +1200 (NZST) (envelope-from jonc) Date: Wed, 30 May 2001 09:36:13 +1200 From: Jonathan Chen To: David Banning Cc: questions@FreeBSD.ORG Subject: Re: Bad system call - workaround help needed Message-ID: <20010530093613.B93515@itouchnz.itouch> References: <20010529131934.A3725@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010529131934.A3725@yahoo.com>; from sky_tracker@yahoo.com on Tue, May 29, 2001 at 01:19:35PM -0500 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, May 29, 2001 at 01:19:35PM -0500, David Banning wrote: > This SCO program I am running allows me to pipe my reports out to > any program. I have to compile it into the database code, which is not > open. I am piping to a printer but the program crashes. > > It works fine if I just pipe it to a shell script like this one; > > cat $1 > ~/printfile > > Then I can go "cat ~/printfile | lp -dlj -s" > and it prints fine. > > But for some strange reason, if I expand the program to > > cat $1 > ~/printfile > cat ~/printfile | lp -dlj -s > > the program crashes, > with bad system call - signal 12 If you're using "~/printfile", it appears you're using the csh, how about seeing whether it works with /bin/sh? ie: #!/bin/sh cat $1 > /tmp/printfile cat /tmp/printfile | lp -dlj -s or even shorten it to: #!/bin/sh lp -dlj -s -- Jonathan Chen ---------------------------------------------------------------------- "If everything's under control, you're going too slow" - Mario Andretti To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message