From owner-freebsd-hackers Sat Oct 28 8:14:38 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from web9608.mail.yahoo.com (web9608.mail.yahoo.com [216.136.129.187]) by hub.freebsd.org (Postfix) with SMTP id 9121337B479 for ; Sat, 28 Oct 2000 08:14:37 -0700 (PDT) Message-ID: <20001028151437.26838.qmail@web9608.mail.yahoo.com> Received: from [155.239.82.78] by web9608.mail.yahoo.com; Sat, 28 Oct 2000 08:14:37 PDT Date: Sat, 28 Oct 2000 08:14:37 -0700 (PDT) From: Yorick Hardy Subject: pipe through ghostscript causes stdin EAGAIN error To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG A problem with a program I have written (which pipes information to ghostscript) prompted me to check the following cat | gs -sDEVICE=ppmraw - which gives the result from cat(as soon as a newline is entered) cat: stdin: Resource temporarily unavailable (i.e. the error EAGAIN). I am using 4-STABLE, tcsh as the shell and gs6.01. Is ghostscript at fault? In my program, ensuring that all the standard descriptors(stdin,stdout and stderr) were closed before the exec, solved the problem. Is there some way that ghostscript can influence stdin when it only has access to stderr? I tried search the ghostscript code for an explanation, but I could not find any ioctl or fcntl calls relating to the standard descriptors. Thank you for any suggestions. Yorick Hardy __________________________________________________ Do You Yahoo!? Yahoo! Messenger - Talk while you surf! It's FREE. http://im.yahoo.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message