mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-25 02:01:15 -03:00
normalize use of stdio functions taking a stream
We should never use stdio functions that use stdout implicitly. Saving a few characters isn't worth the inconsistency. Too, using the forms such as `fwprintf()` which take an explicit stream makes it easier to find the places we write to stdout versus stderr. Fixes #3728
This commit is contained in:
@@ -80,9 +80,9 @@ void print_jobs(void)
|
||||
job_iterator_t jobs;
|
||||
job_t *j;
|
||||
while (j = jobs.next()) {
|
||||
wprintf("%p -> %ls -> (foreground %d, complete %d, stopped %d, constructed %d)\n",
|
||||
j, j->command_wcstr(), job_get_flag(j, JOB_FOREGROUND), job_is_completed(j),
|
||||
job_is_stopped(j), job_get_flag(j, JOB_CONSTRUCTED));
|
||||
fwprintf(stdout, L"%p -> %ls -> (foreground %d, complete %d, stopped %d, constructed %d)\n",
|
||||
j, j->command_wcstr(), job_get_flag(j, JOB_FOREGROUND), job_is_completed(j),
|
||||
job_is_stopped(j), job_get_flag(j, JOB_CONSTRUCTED));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -944,7 +944,7 @@ void job_continue(job_t *j, bool cont) {
|
||||
// and it is not a short circuited builtin.
|
||||
if ((WIFEXITED(p->status) || WIFSIGNALED(p->status)) && p->pid) {
|
||||
int status = proc_format_status(p->status);
|
||||
// wprintf(L"setting status %d for %ls\n", job_get_flag( j, JOB_NEGATE
|
||||
// fwprintf(stdout, L"setting status %d for %ls\n", job_get_flag( j, JOB_NEGATE
|
||||
// )?!status:status, j->command);
|
||||
proc_set_last_status(job_get_flag(j, JOB_NEGATE) ? !status : status);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user