big kill patch (adds list/help/version)

Joshua Daniel Franklin
Sun Mar 10 18:54:00 GMT 2002

As a result of the 'kill -sigN' functionality, kill does not use
GNU getopt to process options, so this patch required quite a few
changes. While ./kill.exe works the same as /bin/kill for me, as
usual I'm not saying it has any MERCHANTABILITY or FITNESS FOR A 
PARTICULAR PURPOSE. Send me test cases and I will test if you desire.

I also made two "unecessary" changes, which I like to think of as
improvements. First, I removed the goto statement and moved the 
code into a new function called sig0 (the label from the goto). This
and all the other functions now appear above main (). I thought a 
goto was absolutely necessary (even though I haven't needed one since 
VAX assembly), until I read:

Edsger W. Dijkstra "Go To Statement Considered Harmful"

No code was harmed in this move. In fact, being lazy I left all the
variable names the same.
Second, there is now a -l, --list option that will list signal numbers
and a *description* of the signal such as:

24: CPU time limit exceeded

I would like to add the symbolic names like XCPU, HUP, etc. to the list 
option, but I don't know of a dynamic way to do so. Is there something like
strsignal for this, or would it have to be hard-coded?

2002-03-10  Joshua Daniel Franklin <>
* (sig0) New function. Process signals given on command line.
          (usage) Generalize to allow use for help. Describe options.
          (list_signals) New fucntion.
          (print_version) New function. 
          (main) Accomodate new options. Add long options for each. 
           Move goto functionality to sig0.

Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
URL: <>

More information about the Cygwin-patches mailing list