Repository navigation
WIP: fix(jobs): stopped-job warning faces — wait jobspec-only, disown deleting-stopped (Refs #2488, #2489) - #2494
Merged
Merged
Conversation
GNU's wait_for_job stopped warning (jobs.c:3409-3410) is reachable from the wait builtin only through the jobspec path (builtins/wait.def:316). A numeric pid goes to wait_for_single_pid (wait.def:277; jobs.c:2729), which returns the stop status 147 silently. rubash rendered the warning on every operand form; gate all three render sites on the operand being a %-jobspec, per operand in the multi-operand dispatcher. Statuses are unchanged. Refs #2488
GNU delete_job warns 'deleting stopped job %d with process group %ld' (jobs.c:1495-1496) only when the caller passes DEL_WARNSTOPPED, the job is stopped, and subshell_environment == 0. Every disown deletion carries the flag (builtins/jobs.def: delete_job (job, 1) per spec; jobs.c:5091 delete_all_jobs for -a), so add the report to rubash's spec/pid/current-job disown paths and, per stopped job in slot order, to disown -a. The parser now keeps -a and -r apart and threads running_only through (jobs.def: delete_all_jobs takes the -r flag as its argument): disown -r reports nothing, matching GNU. Plain shell exit is not a delete_job path and stays silent, as a negative pin records. Refs #2489
Member
Author
|
[win-acceptance] #2494 PASS — both pins ( Environment: Windows 10 19045 real machine, MSVC Rust debug build of master 9348b8d (contains this merge). No BLOCKER. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修复簇 E:r46 裁决在冻结 master 上新炸出的 jobs 警告面两条(进 1.5.0 发布门)。
#2488(多打)
wait $pid对已停止作业多打warning: wait_for_job: job 1 is stopped。GNU 门控是词法的:wait builtin 只有%...jobspec 操作数走 wait_for_job(builtins/wait.def:316 → jobs.c:3409-3410 才警告),数字 pid 走 wait_for_single_pid(wait.def:277;jobs.c:2729)静默返回 147。rubash 三个渲染点一律改为按操作数形态门控(多操作数路径逐个操作数判),状态值不动。钉 issue2488 3/3(jr09 原形 +%形保留警告 + 混合操作数两种顺序各只响一声)。#2489(漏打) disown 删除已停止作业时漏打
warning: deleting stopped job %d with process group %ld。GNU 门控在 jobs.c:1495-1496 delete_job:调用方带 DEL_WARNSTOPPED + 作业处于 STOPPED + subshell_environment == 0。disown 的全部删除路径都带此旗(jobs.def 单个 delete_job (job, 1);jobs.c:5091 delete_all_jobs 管 -a),故 spec 形、pid 形、裸 disown(当前作业)、-a 逐条补警告;-r 按 GNU delete_all_jobs(running_only) 语义不报(解析层新区分 -a/-r 并透传 running_only)。普通脚本退出不是 delete_job 路径,GNU 实测不警告——钉里留了负向守卫防误加。钉 issue2489 6/6。相邻存量钉复跑:issue1304 5/5、issue1048_1256 1/1。本地 cargo check 干净;两钉均 scrubbed 跑。REPORT 在簇目录(主会话留存)。
Refs #2488
Refs #2489