<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>14415</bug_id>
          
          <creation_ts>2021-06-01 10:11:15 +0000</creation_ts>
          <short_desc>Cannot stop weston service on systemd</short_desc>
          <delta_ts>2021-07-01 15:22:18 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>Runtime</product>
          <component>build-appliance</component>
          <version>3.2.3</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>3.4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Markus Bauer">mb</reporter>
          <assigned_to name="Joshua Watt">JPEWhacker</assigned_to>
          <cc>randy.macleod</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>90540</commentid>
    <comment_count>0</comment_count>
    <who name="Markus Bauer">mb</who>
    <bug_when>2021-06-01 10:11:15 +0000</bug_when>
    <thetext>Hi everyone.

When I build a systemd rootfs/kernel, including weston (core-image-weston), weston comes up fine, but I am not able to stop it. Neither

`systemctl stop weston`
nor
`service weston stop`
works.

The reason is, that `/etc/init.d/weston` has &quot;killproc weston&quot; inside it - but on systemd `/etc/init.d/weston stop` the call of the init.d file generates a pid which is found by `/bin/pidof weston` also. This means, the &quot;stop&quot; call is killed before it&apos;s able to kill weston.

My hotfix is the following:


`
stop)
        echo &quot;Stopping Weston&quot;
        killproc /usr/bin/weston
  ;;
`

But what if you are running weston on multiple VT&apos;s? Wouldn&apos;t it be better if weston service would leave a pid and we could kill exactly that pid?


Best Regards

Markus Bauer</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90570</commentid>
    <comment_count>1</comment_count>
    <who name="Joshua Watt">JPEWhacker</who>
    <bug_when>2021-06-03 15:14:30 +0000</bug_when>
    <thetext>What version of Yocto are you using? The latest versions have a dedicated systemd service for dealing with weston, so that should be used instead of the sysvinit scripts.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90585</commentid>
    <comment_count>2</comment_count>
    <who name="Markus Bauer">mb</who>
    <bug_when>2021-06-07 06:36:57 +0000</bug_when>
    <thetext>I use poky Gatesgarth - 3.2.3. 

The `service weston stop` call is not working for me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90614</commentid>
    <comment_count>3</comment_count>
    <who name="Stephen K Jolley">sjolley.yp.pm</who>
    <bug_when>2021-06-12 05:34:10 +0000</bug_when>
    <thetext>Question answered.  Ask another question in you want it in NEEDINFO.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90617</commentid>
    <comment_count>4</comment_count>
    <who name="Joshua Watt">JPEWhacker</who>
    <bug_when>2021-06-12 15:47:17 +0000</bug_when>
    <thetext>Sorry, I&apos;m having a little trouble understanding why the sysvinit scripts are being used to start and stop Weston when systemd is in use. There are specific systemd services for Weston that should be used in stead. Can you clarify?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90622</commentid>
    <comment_count>5</comment_count>
    <who name="Markus Bauer">mb</who>
    <bug_when>2021-06-14 06:06:10 +0000</bug_when>
    <thetext>No, I can&apos;t. I just see that it&apos;s not working - neither `/etc/init.d/weston stop` nor `service weston stop` works.
Are you able to reproduce this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90826</commentid>
    <comment_count>6</comment_count>
    <who name="Joshua Watt">JPEWhacker</who>
    <bug_when>2021-07-01 15:22:18 +0000</bug_when>
    <thetext>If systemd is enable, you really need to use it to start and stop weston instead of the sysvinit scripts. If you can reproduce the same issue without systemd, please reopen the bug.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>