From owner-freebsd-questions Sat May 1 18: 0:32 1999 Delivered-To: freebsd-questions@freebsd.org Received: from gershwin.tera.com (gershwin.tera.com [207.224.230.28]) by hub.freebsd.org (Postfix) with ESMTP id DC7A914CB0 for ; Sat, 1 May 1999 18:00:30 -0700 (PDT) (envelope-from kline@tera.com) Received: from athena.tera.com (athena.tera.com [207.224.230.169]) by gershwin.tera.com (8.8.8/8.8.8) with ESMTP id SAA07803; Sat, 1 May 1999 18:00:27 -0700 (PDT) From: Gary Kline Received: (from kline@localhost) by athena.tera.com (8.7.5/8.7.3) id SAA14746; Sat, 1 May 1999 18:00:26 -0700 (PDT) Message-Id: <199905020100.SAA14746@athena.tera.com> Subject: Re: printjob.c In-Reply-To: <19990502013254.B54487@scientia.demon.co.uk> from Ben Smithurst at "May 2, 99 01:32:54 am" To: ben@scientia.demon.co.uk (Ben Smithurst) Date: Sat, 1 May 1999 18:00:26 -0700 (PDT) Cc: kline@tera.com, kstewart@3-cities.com, questions@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL23 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG According to Ben Smithurst: > Gary Kline wrote: > > > Sure. This would have been pretty common, both by new users > > and by the more seasoned user. > > > > Doug White, if you have any time, maybe you can think of > > something obscure... Why execv() fails in printjob.c, > > andor why lpr doesn't queue anything. > > One thing you may or may not have checked: if it's a script of some sort, > is the #! line correct? > I find the #! line 3 spaces down in hpif and thought, Wow! But I fixed that and retried "lpr hpif" and no-joy. Here is the script that I swiped from the Search page. The script may be bad; No more "cannot execv %s" errors; now the error is from lp. May 1 17:46:22 tao su: kline to root on /dev/ttyp1 May 1 17:46:51 tao lpd[15275]: lp: job could not be printed (cfA400tao.thought.org) #!/bin/sh # # ifhp - Print Ghostscript-simulated PostScript on a Canon BJC-4100 # Installed in /usr/local/libexec/hpif # # Treat LF as CR+LF: # printf "\033&k2G" || exit 2 # # Read first two characters of the file # read first_line first_two_chars=`expr "$first_line" : '\(..\)'` if [ "$first_two_chars" = "%!" ]; then # # It is PostScript; use Ghostscript to scan-convert and print it # /usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=epsonc -sOutputFile=- - \ && ex So: new errs. Any idea what's causing this complaint from ``lp''? hmmm. thanks! gary To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message