Changeset 8d74fdd in mainline for uspace/app/sysctl/main.c


Ignore:
Timestamp:
2019-08-17T13:57:05Z (6 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
f92b315
Parents:
be07995
git-author:
Michal Koutný <xm.koutny+hos@…> (2016-01-27 00:01:13)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2019-08-17 13:57:05)
Message:

sysman: Shutdown operation as shutdown.tgt isolation

Since not all dependencies are captured by graph, sysman and taskman are
ignored when stopping servers, so that they can complete the shutdown
transition.

Conflicts:

boot/Makefile.common

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/sysctl/main.c

    rbe07995 r8d74fdd  
    3939#include <str_error.h>
    4040#include <sysman/ctl.h>
     41#include <unistd.h>
    4142
    4243#define NAME "sysctl"
     
    141142}
    142143
     144static int shutdown(int argc, char *argv[])
     145{
     146        const int delay = 3;
     147        printf("Will shutdown in %i seconds...\n", delay);
     148        sleep(delay);
     149        printf("Shutdown now.\n");
     150
     151        int rc = sysman_shutdown();
     152        if (rc != EOK) {
     153                printf("Shutdown request failed: %s.\n", str_error(rc));
     154        }
     155        return rc;
     156}
     157
    143158command_t commands[] = {
    144159        { "list-units", 0, &list_units },
    145160        { "start",      1, &start },
    146161        { "stop",       1, &stop },
     162        { "shutdown",   0, &shutdown },
    147163        { 0 }
    148164};
Note: See TracChangeset for help on using the changeset viewer.