Reboot And other system calls

Mark Shuttleworth mark at ubuntu.com
Wed Aug 5 15:41:19 UTC 2015


On 05/08/15 03:19, muraleo at gmail.com wrote:
> How can a application perform system reboot programmatically ? Is this operations only possible from a framework or an app can also do this?
>
> Performing system("reboot") from a framework code fails with operation not permitted error code.

Yes, we'll need to make some sort of "reboot requested" flag, and
lifecycle around that.

Out of curiousity, at the app level, what would drive a reboot? I can
see how a kernel or shared library (from the core) might need a reboot,
but what app would require a reboot?

> Also, I need to install  snaps programmatically . Is this possible . Should the calling snap needs to have any special privileges or if we can add these as  some form of meta info in yaml files

Your gadget snap should be able to specify required snaps on the device.
Other snaps can't have dependencies other than frameworks.

Mark




More information about the snappy-app-devel mailing list