diff options
author | AnotherTest <ali.mpfard@gmail.com> | 2020-06-25 17:15:23 +0430 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-07-05 15:43:14 +0200 |
commit | 639c1a17379054138d350c85e6fcab3d886707d8 (patch) | |
tree | 2e1e3e20f4736617d5047d0c7ff5ffb5853182a2 /Shell/Builtin.cpp | |
parent | d2bdbc3e775e08b16d38033d978417955e7c2bfa (diff) | |
download | serenity-639c1a17379054138d350c85e6fcab3d886707d8.zip |
Shell: Build as part of Lagom as well
Bringing the Serenity Shell to your very own host system :^)
Diffstat (limited to 'Shell/Builtin.cpp')
-rw-r--r-- | Shell/Builtin.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Shell/Builtin.cpp b/Shell/Builtin.cpp index 5a3928fde9..a9526eb641 100644 --- a/Shell/Builtin.cpp +++ b/Shell/Builtin.cpp @@ -28,6 +28,7 @@ #include <AK/LexicalPath.h> #include <LibCore/ArgsParser.h> #include <LibCore/File.h> +#include <inttypes.h> #include <signal.h> #include <sys/wait.h> @@ -94,7 +95,7 @@ int Shell::builtin_bg(int argc, const char** argv) job->set_running_in_background(true); dbg() << "Resuming " << job->pid() << " (" << job->cmd() << ")"; - fprintf(stderr, "Resuming job %llu - %s\n", job->job_id(), job->cmd().characters()); + fprintf(stderr, "Resuming job %" PRIu64 " - %s\n", job->job_id(), job->cmd().characters()); if (killpg(job->pgid(), SIGCONT) < 0) { perror("killpg"); @@ -340,7 +341,7 @@ int Shell::builtin_fg(int argc, const char** argv) job->set_running_in_background(false); dbg() << "Resuming " << job->pid() << " (" << job->cmd() << ")"; - fprintf(stderr, "Resuming job %llu - %s\n", job->job_id(), job->cmd().characters()); + fprintf(stderr, "Resuming job %" PRIu64 " - %s\n", job->job_id(), job->cmd().characters()); if (killpg(job->pgid(), SIGCONT) < 0) { perror("killpg"); @@ -406,7 +407,7 @@ int Shell::builtin_disown(int argc, const char** argv) job->deactivate(); if (!job->is_running_in_background()) - fprintf(stderr, "disown warning: job %llu is currently not running, 'kill -%d %d' to make it continue\n", job->job_id(), SIGCONT, job->pid()); + fprintf(stderr, "disown warning: job %" PRIu64 " is currently not running, 'kill -%d %d' to make it continue\n", job->job_id(), SIGCONT, job->pid()); jobs.remove(job_index); } @@ -473,13 +474,13 @@ int Shell::builtin_jobs(int argc, const char** argv) switch (mode) { case Basic: - printf("[%llu] %c %s %s\n", job.value->job_id(), background_indicator, status, job.value->cmd().characters()); + printf("[%" PRIu64 "] %c %s %s\n", job.value->job_id(), background_indicator, status, job.value->cmd().characters()); break; case OnlyPID: - printf("[%llu] %c %d %s %s\n", job.value->job_id(), background_indicator, pid, status, job.value->cmd().characters()); + printf("[%" PRIu64 "] %c %d %s %s\n", job.value->job_id(), background_indicator, pid, status, job.value->cmd().characters()); break; case ListAll: - printf("[%llu] %c %d %d %s %s\n", job.value->job_id(), background_indicator, pid, job.value->pgid(), status, job.value->cmd().characters()); + printf("[%" PRIu64 "] %c %d %d %s %s\n", job.value->job_id(), background_indicator, pid, job.value->pgid(), status, job.value->cmd().characters()); break; } } |