mainThe GNU Bourne-Again SHell - Support: sr #108944, Reject kill when invalid argument...

 
 

sr #108944: Reject kill when invalid argument is found

Submitter:  None
Submitted:  Sun 27 Dec 2015 02:52:08 PM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Invalid
Privacy:  Public Assigned to:  None
Originator Email:  -email is unavailable- Open/Closed:  Open
Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 28 Dec 2015 03:11:15 PM UTC, comment #1: 

This is not a bug.  Posix says that kill will attempt to send a signal to each operand, interpreting it as a pid/pgrp or a job specification.  If you don't want kill to continue after an error, undefine CONTINUE_AFTER_KILL_ERROR in config-top.h and rebuild bash.

Chet Ramey <chet>
Group administrator
Sun 27 Dec 2015 02:52:08 PM UTC, original submission:  

I strongly suggest kill command not to execute if invalid arguments are found. Real life situation:

I wanted to continue all processes, so I wanted to type kill -SIGCONT -1 but instead I typed kill SIGCONT -1 by mistake which killed everything it could with SIGTERM.

I admit that I did mistake, however, I think that well written program should catch detectable mistakes.

I suggest, that the command should fail and not send any signal, if input is malformed (invalid signal, PID not a number etc.)

I'm willing to look at the code and do the change if it's accepted, but I don't have time to do it right now.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by chet (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-12-28 chet StatusNone Invalid

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code