Re: xsane requests username and password after saned has exited

From: Henning Meier-Geinitz (henning@meier-geinitz.de)
Date: Mon Jun 04 2001 - 09:56:32 PDT

  • Next message: SCC: "Re: umax 2200 hi res scan"

    Hi,

    On Mon, Jun 04, 2001 at 02:51:10PM +0200, Oliver Rauch wrote:
    > I think the reason is if the frontend dies and does not inform saned to exit
    > then saned never will exit at all.

    At least on Linux, saned will exit even if you kill -9 xsane. I don't
    understand all details but maybe that's because of signal (SIGPIPE, quit)
    in saned.c. So maybe this is for other platforms?

    > we have to decide what we have to do.
    > When saned never exits when the frontend dies without calling sane_exit or sane_close
    > then we need the watchdog. In this case I see two possibilities:
    > 1) sane-net does fork() and starts a process that sends a keep-alive package e.g. ever 60 seconds.
    > 2) the frontend has to initiate the keep alive package.
    >
    > A keep alive packge e.g. could be to read the option numbers (option number 0).
    >
    > The fork() in sane-net has the advantage that the network protocol works
    > invisiblie for the fronten, no frontend has to care about.
    >
    > The advantage of the frontend initiated keep alive package is that we
    > donīt need to create a separate keep-alive process.

    I haven't looked into details but don't we need some sort of locking for
    this? What happens, if some data is transmitted through the net and in
    this moment the forked process starts its sane_get_option_descriptor (handle, 0)
    function?

    > May be we could define a well_known_option "create_keepalives" that can be
    > set by GUI-frontends, so for command-line-frontends the fork() is not called.

    I'm not sure if this is necessary as the keep-alive shouldn't harm
    command-line frontends (it's just not necessary).

    I will change the alarm to 3600 seconds for now.

    Bye,
      Henning

    --
    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 : Mon Jun 04 2001 - 09:59:57 PDT