View Issue Details

IDProjectCategoryView StatusLast Update
00012601003.1(2016/18)/Issue7+TC2Shell and Utilitiespublic2024-06-11 09:08
Reporterstephane Assigned To 
PrioritynormalSeverityCommentTypeClarification Requested
Status ClosedResolutionAccepted 
NameStephane Chazelas
Organization
User Reference
Sectionkill utility
Page Number2879, 2882 (in 2018 edition)
Line Number94926-94929 95071 95092
Interp StatusApproved
Final Accepted TextSee 0001260:0004490
Summary0001260: "kill pid" XSI only
DescriptionThe synopsis of the kill utility suggests that "kill pid" is only required to be supported by systems implementing XSI as the non-XSI synopsis:

    kill -s signal_name pid...

doesn't have -s signal_name in square brackets, suggesting it's mandatory. Is that intentional? I'd expect "kill 123", "kill -- -123", "kill %1" to consistently send SIGTERM to the 123 pid or pgid, or %1 job, portably even on non-XSI.

Line 95071 has:

kill −TERM −123

It seems to me it should be either:

kill -TERM -- -123

and be XSI shaded, or:

kill -s TERM -- -123

The rationale section has:

> To avoid an ambiguity of an initial negative number argument specifying either a signal number or a process group, POSIX.1-2017 mandates that it is always considered the former by implementations that support the XSI option. It also requires that conforming applications always use the "− −" options terminator argument when specifying a process group, unless an option is also specified.

(emphasis mine)

I don't see anything in the normative text that says that a -- is not required when an option is specified.

AFAICT, in kill -s TERM -123 or kill -TERM -123, that -123 would still be treated as an option (and in practice is by several implementation).
Desired ActionUnless I'm missing something something, change first synopsis line to:

kill [−s signal_name] pid...

change

kill -TERM -123

to

kill -s TERM -- -123

Remove the "unless an option is also specified." part in the rationale.
Tagstc3-2008

Activities

Don Cragun

2019-07-25 15:26

manager   bugnote:0004490

Interpretation response
------------------------
The standard is unclear on this issue, and no conformance distinction can be made between alternative implementations based on this. This is being referred to the sponsor.

Rationale:
-------------
The standard is not clear as to whether or not -s is required on non-XSI systems. No known implementations require it.

Notes to the Editor (not part of this interpretation):
-------------------------------------------------------
Make the changes suggested in the Desired Action.

agadmin

2019-10-07 15:16

administrator   bugnote:0004602

Interpretation proposed: 7 October 2019

agadmin

2019-11-11 12:20

administrator   bugnote:0004647

Interpretation Approved: 11 Nov 2019

Issue History

Date Modified Username Field Change
2019-06-14 21:12 stephane New Issue
2019-06-14 21:12 stephane Name => Stephane Chazelas
2019-06-14 21:12 stephane Section => kill utility
2019-06-14 21:12 stephane Page Number => 2879, 2882 (in 2018 edition)
2019-06-14 21:12 stephane Line Number => 94926-94929 95071 95092
2019-07-25 15:26 Don Cragun Note Added: 0004490
2019-07-25 15:27 Don Cragun Interp Status => ---
2019-07-25 15:27 Don Cragun Status New => Interpretation Required
2019-07-25 15:27 Don Cragun Resolution Open => Accepted
2019-07-25 15:27 Don Cragun Tag Attached: tc3-2008
2019-07-25 15:31 Don Cragun Final Accepted Text => See 0001260:0004490
2019-07-25 16:25 Don Cragun Interp Status --- => Pending
2019-10-07 15:16 agadmin Interp Status Pending => Proposed
2019-10-07 15:16 agadmin Note Added: 0004602
2019-11-11 12:20 agadmin Interp Status Proposed => Approved
2019-11-11 12:20 agadmin Note Added: 0004647
2019-12-04 11:57 geoffclare Status Interpretation Required => Applied
2024-06-11 09:08 agadmin Status Applied => Closed