Re: saned won't run under inetd

From: Petter Reinholdtsen (pere@hungry.com)
Date: Thu May 10 2001 - 14:24:41 PDT

  • Next message: Petter Reinholdtsen: "Return values of sane_init() (Was: EOF detection)"

    [Morten Sickel]
    > but if I try to start saned from inetd, xsane comes up, scans for
    > devices and just dies with a segfault.

    Sounds like the same problem I ran into setting up a scanner server.
    There is a bug somewhere leading to this behaviour. I solved it by
    starting saned with this shell script wrapper, and running it instead
    from inetd:

      #!/bin/sh
      #
      # Call saned with stderr redirected, to avoid strange crash.
     
      #export SANE_DEBUG_NET=255
      #export SANE_DEBUG_DLL=255
      #export SANE_DEBUG_HP=255
     
      exec 2> /dev/null
     
      exec /usr/local/sbin/saned

    My guess is that the code to test if stderr is a socket fails in some
    strange way. (I wrote it, I guess I should know -- but I don't. :-) I
    tried to redirect stderr to a file to find out if anything was written
    to it, but the file was empty.

    I do not understand why this worked for me. :-/

    -- 
    ##>  Petter Reinholdtsen <##    | pere@td.org.uit.no
    http://www.hungry.com/~pere/ O- | Go Mozilla, go! Go!
    

    -- Source code, list archive, and docs: http://www.mostang.com/sane/ To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com



    This archive was generated by hypermail 2b29 : Thu May 10 2001 - 14:12:35 PDT