[sane-devel] Best way to stop scanimage?

Jeff Sadowski jeff.sadowski at gmail.com
Fri Sep 29 13:52:49 UTC 2017

Thank you Olaf, :-)

I am developing a php interface I'm calling it php saneng I have it on
bitbucket for now and using proc_open. I will send the signal via
proc_terminate giving it the second option being the signal I want to use.
I had a similar project I got working in the past specifically for my
scanner and I seem to recall I was giving it signal SIGTERM and I think
that was causing issues where as when I would test from the command line
and use ctrl+c it would leave the scanner in a usable state. So now that I
read about what ctrl+c sends (SIGINT) I think it would be better to send
that. Maybe there is something wrong with brothers backend that it prefers
a SIGINT over a SIGTERM. I'll experiment and let you know once I get my
project a little farther along. My similar project I had got working was
destroyed when an upgrade failed and I forgot to back it up. No biggy I
should have a better working one in a few weeks.

On Fri, Sep 29, 2017 at 3:51 AM, Olaf Meeuwissen <paddy-hack at member.fsf.org>

> Hi Jeff,
> Jeff Sadowski writes:
> >>> On Thu, Sep 28, 2017 at 10:30 AM, Jeff Sadowski <
> jeff.sadowski at gmail.com>
> >>> wrote:
> >>> > Is there a good way to stop scanimage?
> > Ooooh Ctrl-C sends the INT(-2) signal that is the signal I think I want.
> You've already found out how to solve your issue but here are the
> details.
> Sending a *single* SIGINT or SIGTERM (and if supported by your system at
> compile time SIGHUP or SIGPIPE) will cancel the scan in progress.  This
> should leave your scanner in a usable state.
> Sending one of these signals again will abort the scan in progress (and
> may leave your scanner in an unusable state).
> You can send signals with the kill command or via the keyboard.  The
> latter is somewhat key binding dependent but usually Ctrl-C will do the
> Right Thing.
> Hope this helps,
> --
> Olaf Meeuwissen, LPIC-2            FSF Associate Member since 2004-01-27
>  GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13  F43E B8A4 A88A F84A 2DD9
>  Support Free Software                        https://my.fsf.org/donate
>  Join the Free Software Foundation              https://my.fsf.org/join
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20170929/2765e5fb/attachment.html>

More information about the sane-devel mailing list