Provide SIGINT/SIGTERM support

Bug #1475841 reported by Giovanni Santini
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Yawls
Fix Released
Undecided
Unassigned

Bug Description

As in title; actually, running the yawls daemon ("yawls -d") with systemd and killing it marks the systemd unit as "failed".

--- Example log ---
$ systemctl start yawlsd
$ systemctl status -l yawlsd
● yawlsd.service - Adjust the brightness level of your display by using the internal/external webcam of your notebook as an ambient light sensor.
   Loaded: loaded (/usr/lib/systemd/system/yawlsd.service; disabled; vendor preset: disabled)
   Active: active (running) since sab 2015-07-18 10:06:45 CEST; 30s ago
 Main PID: 9737 (yawls)
   CGroup: /system.slice/yawlsd.service
           ├─9737 /bin/bash /usr/bin/yawls -d
           └─9749 /usr/lib/jvm/default-runtime/bin/java -d64 -server -XX:+AggressiveOpts -Xmn12M -Xms38M -Xmx38M -Djava.library.path=/usr/share/opencv/java -jar /usr/share/yawls/yawls.jar -d

lug 18 10:06:45 antergos_E1-570G systemd[1]: Started Adjust the brightness level of your display by using the internal/external webcam of your notebook as an ambient light sensor..
lug 18 10:06:45 antergos_E1-570G systemd[1]: Starting Adjust the brightness level of your display by using the internal/external webcam of your notebook as an ambient light sensor....
lug 18 10:06:45 antergos_E1-570G yawls[9737]: Yawls service started. Press {CTRL+C} to abort...

ency@antergos_E1-570G:~/Lavoretti/yawls $ systemctl stop yawlsd
ency@antergos_E1-570G:~/Lavoretti/yawls $ systemctl status -l yawlsd
● yawlsd.service - Adjust the brightness level of your display by using the internal/external webcam of your notebook as an ambient light sensor.
   Loaded: loaded (/usr/lib/systemd/system/yawlsd.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since sab 2015-07-18 10:07:20 CEST; 2s ago
  Process: 9737 ExecStart=/usr/bin/yawls -d (code=exited, status=143)
 Main PID: 9737 (code=exited, status=143)
   CGroup: /system.slice/yawlsd.service

lug 18 10:06:45 antergos_E1-570G systemd[1]: Started Adjust the brightness level of your display by using the internal/external webcam of your notebook as an ambient light sensor..
lug 18 10:06:45 antergos_E1-570G systemd[1]: Starting Adjust the brightness level of your display by using the internal/external webcam of your notebook as an ambient light sensor....
lug 18 10:06:45 antergos_E1-570G yawls[9737]: Yawls service started. Press {CTRL+C} to abort...
lug 18 10:07:20 antergos_E1-570G systemd[1]: Stopping Adjust the brightness level of your display by using the internal/external webcam of your notebook as an ambient light sensor....
lug 18 10:07:20 antergos_E1-570G systemd[1]: yawlsd.service: Main process exited, code=exited, status=143/n/a
lug 18 10:07:20 antergos_E1-570G systemd[1]: Stopped Adjust the brightness level of your display by using the internal/external webcam of your notebook as an ambient light sensor..
lug 18 10:07:20 antergos_E1-570G systemd[1]: yawlsd.service: Unit entered failed state.
lug 18 10:07:20 antergos_E1-570G systemd[1]: yawlsd.service: Failed with result 'exit-code'.
$
--- End of Example Log ---

The reason of this error is clearly explained here:
http://stackoverflow.com/questions/25111920/why-does-systemd-service-running-node-js-app-show-state-of-failed-when-stopped-p

AUR package: https://aur4.archlinux.org/packages/yawls/
systemd service unit: https://aur4.archlinux.org/cgit/aur.git/tree/yawlsd.service?h=yawls
All the sources for ArchLinux packaging: https://aur4.archlinux.org/cgit/aur.git/tree/?h=yawls

description: updated
description: updated
Changed in yawls:
status: New → Fix Committed
Changed in yawls:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.