All of lore.kernel.org
 help / color / mirror / Atom feed
* Inactive service of hello world #yocto
@ 2021-09-07 17:20 yasminebenghozzi6
  2021-09-07 17:43 ` [yocto] " Rudolf J Streif
  0 siblings, 1 reply; 3+ messages in thread
From: yasminebenghozzi6 @ 2021-09-07 17:20 UTC (permalink / raw)
  To: yocto


[-- Attachment #1.1: Type: text/plain, Size: 211 bytes --]

Hi everyone,

I wanted to run the helloworld service, but it keeps telling that its inactive , I really cant find why, I changed the service many times but no solution.
I m sorry I ant copy paste from putty

[-- Attachment #1.2: Type: text/html, Size: 379 bytes --]

[-- Attachment #2: Screenshot from 2021-09-07 17-57-50.png --]
[-- Type: image/png, Size: 6551 bytes --]

[-- Attachment #3: Screenshot from 2021-09-07 17-58-34.png --]
[-- Type: image/png, Size: 5431 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [yocto] Inactive service of hello world #yocto
  2021-09-07 17:20 Inactive service of hello world #yocto yasminebenghozzi6
@ 2021-09-07 17:43 ` Rudolf J Streif
  2021-09-08  6:59   ` Nicolas Jeker
  0 siblings, 1 reply; 3+ messages in thread
From: Rudolf J Streif @ 2021-09-07 17:43 UTC (permalink / raw)
  To: yasminebenghozzi6; +Cc: Yocto


[-- Attachment #1.1: Type: text/plain, Size: 769 bytes --]

What does your 'Hello World' service do? Just print 'Hello World' to the
console and then exit?

If so that would be the reason why it is inactive. Systemd starts it and
then it exits. Typically, services keep running (except for some special
cases) once they are started. That's what makes them a service. To stop
them 'systemctl stop <service>' is used. By default systemctl sends SIGTERM
to tell the service to clean up and terminate itself.

:rjs


On Tue, Sep 7, 2021, 10:20 <yasminebenghozzi6@gmail.com> wrote:

> Hi everyone,
>
> I wanted to run the helloworld service, but it keeps telling that its
> inactive , I really cant find why, I changed the service many times but no
> solution.
> I m sorry I ant copy paste from putty
>
> 
>
>

[-- Attachment #1.2: Type: text/html, Size: 1309 bytes --]

[-- Attachment #2: Screenshot from 2021-09-07 17-57-50.png --]
[-- Type: image/png, Size: 6551 bytes --]

[-- Attachment #3: Screenshot from 2021-09-07 17-58-34.png --]
[-- Type: image/png, Size: 5431 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [yocto] Inactive service of hello world #yocto
  2021-09-07 17:43 ` [yocto] " Rudolf J Streif
@ 2021-09-08  6:59   ` Nicolas Jeker
  0 siblings, 0 replies; 3+ messages in thread
From: Nicolas Jeker @ 2021-09-08  6:59 UTC (permalink / raw)
  To: Rudolf J Streif, yasminebenghozzi6; +Cc: Yocto

On Tue, 2021-09-07 at 10:43 -0700, Rudolf J Streif wrote:
> What does your 'Hello World' service do? Just print 'Hello World' to
> the console and then exit?
> 
> If so that would be the reason why it is inactive. Systemd starts it
> and then it exits. Typically, services keep running (except for some
> special cases) once they are started. That's what makes them a service.
> To stop them 'systemctl stop <service>' is used. By default systemctl
> sends SIGTERM to tell the service to clean up and terminate itself.
> 

To piggyback on that, it is possible to set Type=oneshot[1] for the
service so that systemd considers the service to be up after it exited.
I find it useful for init or migration scripts that another service can
then depend upon.

[1]:
https://www.freedesktop.org/software/systemd/man/systemd.service.html#Type=


> :rjs
> 
> 
> On Tue, Sep 7, 2021, 10:20 <yasminebenghozzi6@gmail.com> wrote:
> > Hi everyone, 
> > 
> > I wanted to run the helloworld service, but it keeps telling that its
> > inactive , I really cant find why, I changed the service many times
> > but no solution.
> > I m sorry I ant copy paste from putty
> > 
> > 
> > 
> 
> 
> 



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-08  6:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-07 17:20 Inactive service of hello world #yocto yasminebenghozzi6
2021-09-07 17:43 ` [yocto] " Rudolf J Streif
2021-09-08  6:59   ` Nicolas Jeker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.