reboot leaves 9vx and prints its arguments - vx32 - Local 9vx git repository for patches. (DIR) Log (DIR) Files (DIR) Refs --- (DIR) commit 45b565906c3efd1d2453f897b13685589fefdaf5 (DIR) parent 03af636454d1edaf3187d88cbb793484b502ed5e (HTM) Author: Jesus Galan Lopez (yiyus) <yiyu.jgl@gmail.com> Date: Tue, 7 Sep 2010 02:22:51 +0200 reboot leaves 9vx and prints its arguments Diffstat: doc/9vx.1 | 2 ++ src/9vx/stub.c | 7 +++++++ 2 files changed, 9 insertions(+), 0 deletions(-) --- (DIR) diff --git a/doc/9vx.1 b/doc/9vx.1 @@ -133,6 +133,8 @@ pairs in a similar fasion to plan9.ini(8). Additional options are (that can also be part of a netdev line) and .I localroot. +.SS Exiting 9vx +Reboot signals terminate 9vx execution. in particular, the reboot command will exit and print its arguments to starndard output. .SS Running 9vx as a cpu server To run 9vx as a cpu server the .I service (DIR) diff --git a/src/9vx/stub.c b/src/9vx/stub.c @@ -429,6 +429,12 @@ int cpuserver = 0; void rebootcmd(int argc, char **argv) { + int i; + restoretty(); + for(i = 0; i < argc; i++) + iprint("%s%s", argv[i], argc - i > 1 ? " " : ""); + iprint("\n"); + exit(0); error(Egreg); } @@ -481,6 +487,7 @@ delay(int x) void reboot(void *entry, void *code, ulong size) { + restoretty(); exit(0); error(Egreg); }