Coder Social home page Coder Social logo

exit code about ipconflict HOT 3 CLOSED

ciroiriarte avatar ciroiriarte commented on August 24, 2024
exit code

from ipconflict.

Comments (3)

fgiuba avatar fgiuba commented on August 24, 2024

Yes, I think this is a good idea.

So far we used exit code 0 for any valid result (conflict/no-conflict) and exit code 1 for invalid parameters. I would prefer to do as follow:

  • 0 - No conflict.
  • 1 - One or more conflicts found.
  • 2 - Invalid parameters.

from ipconflict.

ciroiriarte avatar ciroiriarte commented on August 24, 2024

There are some conventions for comparison tools, maybe it's a little counterintuitive given we're "looking for conflicts"

There are conventions for what sorts of status values certain programs should return. The most common convention is simply 0 for success and 1 for failure. Programs that perform comparison use a different convention: they use status 1 to indicate a mismatch, and status 2 to indicate an inability to compare. Your program should follow an existing convention if an existing convention makes sense for it.

If I interpret that correctly, it should be the other way around -_-'

Eitherway, if it's documented I think it will effective.

Ref: https://www.gnu.org/software/libc/manual/html_node/Exit-Status.html

from ipconflict.

fgiuba avatar fgiuba commented on August 24, 2024

I agree, let's follow the existing conventions. So, exit status will be:

  • 0 - One or more conflicts found.
  • 1 - No conflict found.
  • 2 - Aborted or invalid input.

from ipconflict.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.