Code Monkey home page Code Monkey logo

Comments (7)

kittykitty71 avatar kittykitty71 commented on June 28, 2024

I agree. Would allow for hooking actual restart functions, and even better if it were configurable, since that would provide easy functionality for any custom situational restart need that may arise.

Aside from the fact that it really isn't necessary to have two commands do identical things, whole idea just sounds like good sense and good coding IMO.

from fuzzball.

 avatar commented on June 28, 2024

I didn't check to see if @armageddon also generates a zero exit code. If so, I would definitely suggest lumping that in with the above.

from fuzzball.

wyld-sw avatar wyld-sw commented on June 28, 2024

This is a good idea. It prompted me to review exit codes for the main server. The main ones seem to be:

code 1:
invalid syntax or inconsistent options
cannot spawn resolver
cannot set socket options
setuid/setguid issues
@armageddon

code 2:
problem loading database

code 3:
output file the same as input file (with DISKBASE on)
cannot create socket

code 4:
cannot cd to game directory
cannot bind socket

code 7:
signal received - bailout

So, compile-time options RESTART_EXIT_CODE (default 0) and ARMAGEDDON_EXIT_CODE (default 1) seem appropriate. Any other option or standardization recommended? It would seem that exit codes 2-4 could just use code 1, but there may be a good reason for the way it is.

from fuzzball.

 avatar commented on June 28, 2024

I am hesitant to change any existing behaviors. Perhaps assign an unused exit code to @restart, and leave @shutdown as 0?

from fuzzball.

wyld-sw avatar wyld-sw commented on June 28, 2024

Yeah, @shutdown would remain 0. I can change the default for RESTART_EXIT_CODE to 5.

from fuzzball.

wyld-sw avatar wyld-sw commented on June 28, 2024

Per our conversation on SPR, I'll proceed with compile-time options RESTART_EXIT_CODE (default 0) and ARMAGEDDON_EXIT_CODE (default 1). Look for those soon.

from fuzzball.

wyld-sw avatar wyld-sw commented on June 28, 2024

Compile-time options RESTART_EXIT_CODE (default 0) and ARMAGEDDON_EXIT_CODE (default 1) have been added to include/config.h .

from fuzzball.

Related Issues (20)

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.