sane-project-website/old-archive/2001-05/0119.html

119 wiersze
4.3 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>sane-devel: Re: saned won't run under inetd</TITLE>
<META NAME="Author" CONTENT="Petter Reinholdtsen (pere@hungry.com)">
<META NAME="Subject" CONTENT="Re: saned won't run under inetd">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Re: saned won't run under inetd</H1>
<!-- received="Thu May 10 14:10:26 2001" -->
<!-- isoreceived="20010510211026" -->
<!-- sent="Thu, 10 May 2001 23:24:41 +0200" -->
<!-- isosent="20010510212441" -->
<!-- name="Petter Reinholdtsen" -->
<!-- email="pere@hungry.com" -->
<!-- subject="Re: saned won't run under inetd" -->
<!-- id="E14xxvN-0000sf-00@false.linpro.no" -->
<!-- inreplyto="saned won't run under inetd" -->
<STRONG>From:</STRONG> Petter Reinholdtsen (<A HREF="mailto:pere@hungry.com?Subject=Re:%20saned%20won't%20run%20under%20inetd&In-Reply-To=&lt;E14xxvN-0000sf-00@false.linpro.no&gt;"><EM>pere@hungry.com</EM></A>)<BR>
<STRONG>Date:</STRONG> Thu May 10 2001 - 14:24:41 PDT
<P>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0120.html">Petter Reinholdtsen: "Return values of sane_init() (Was: EOF detection)"</A>
<UL>
<LI><STRONG>Previous message:</STRONG> <A HREF="0118.html">Sam .: "red and green reversed"</A>
<LI><STRONG>Maybe in reply to:</STRONG> <A HREF="0112.html">Morten Sickel: "saned won't run under inetd"</A>
<!-- nextthread="start" -->
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#119">[ date ]</A>
<A HREF="index.html#119">[ thread ]</A>
<A HREF="subject.html#119">[ subject ]</A>
<A HREF="author.html#119">[ author ]</A>
</UL>
<HR NOSHADE><P>
<!-- body="start" -->
<P>
[Morten Sickel]
<BR>
<EM>&gt; but if I try to start saned from inetd, xsane comes up, scans for
</EM><BR>
<EM>&gt; devices and just dies with a segfault.
</EM><BR>
<P>Sounds like the same problem I ran into setting up a scanner server.
<BR>
There is a bug somewhere leading to this behaviour. I solved it by
<BR>
starting saned with this shell script wrapper, and running it instead
<BR>
from inetd:
<BR>
<P>&nbsp;&nbsp;#!/bin/sh
<BR>
&nbsp;&nbsp;#
<BR>
&nbsp;&nbsp;# Call saned with stderr redirected, to avoid strange crash.
<BR>
&nbsp;
<BR>
&nbsp;&nbsp;#export SANE_DEBUG_NET=255
<BR>
&nbsp;&nbsp;#export SANE_DEBUG_DLL=255
<BR>
&nbsp;&nbsp;#export SANE_DEBUG_HP=255
<BR>
&nbsp;
<BR>
&nbsp;&nbsp;exec 2&gt; /dev/null
<BR>
&nbsp;
<BR>
&nbsp;&nbsp;exec /usr/local/sbin/saned
<BR>
<P>My guess is that the code to test if stderr is a socket fails in some
<BR>
strange way. (I wrote it, I guess I should know -- but I don't. :-) I
<BR>
tried to redirect stderr to a file to find out if anything was written
<BR>
to it, but the file was empty.
<BR>
<P>I do not understand why this worked for me. :-/
<BR>
<PRE>
--
##&gt; Petter Reinholdtsen &lt;## | <A HREF="mailto:pere@td.org.uit.no?Subject=Re:%20saned%20won't%20run%20under%20inetd&In-Reply-To=&lt;E14xxvN-0000sf-00@false.linpro.no&gt;">pere@td.org.uit.no</A>
<A HREF="http://www.hungry.com/~pere/">http://www.hungry.com/~pere/</A> O- | Go Mozilla, go! Go!
<P>--
Source code, list archive, and docs: <A HREF="http://www.mostang.com/sane/">http://www.mostang.com/sane/</A>
To unsubscribe: echo unsubscribe sane-devel | mail <A HREF="mailto:majordomo@mostang.com?Subject=Re:%20saned%20won't%20run%20under%20inetd&In-Reply-To=&lt;E14xxvN-0000sf-00@false.linpro.no&gt;">majordomo@mostang.com</A>
</PRE>
<P><!-- body="end" -->
<HR NOSHADE>
<UL>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0120.html">Petter Reinholdtsen: "Return values of sane_init() (Was: EOF detection)"</A>
<LI><STRONG>Previous message:</STRONG> <A HREF="0118.html">Sam .: "red and green reversed"</A>
<LI><STRONG>Maybe in reply to:</STRONG> <A HREF="0112.html">Morten Sickel: "saned won't run under inetd"</A>
<!-- nextthread="start" -->
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#119">[ date ]</A>
<A HREF="index.html#119">[ thread ]</A>
<A HREF="subject.html#119">[ subject ]</A>
<A HREF="author.html#119">[ author ]</A>
</UL>
<!-- trailer="footer" -->
<HR NOSHADE>
<P>
<SMALL>
<EM>
This archive was generated by <A HREF="http://www.hypermail.org/">hypermail 2b29</A>
: <EM>Thu May 10 2001 - 14:12:35 PDT</EM>
</EM>
</SMALL>
</BODY>
</HTML>