Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardize exit codes (mainly yarprun and RFModule) #395

Closed
jgvictores opened this issue Feb 5, 2015 · 2 comments
Closed

Standardize exit codes (mainly yarprun and RFModule) #395

jgvictores opened this issue Feb 5, 2015 · 2 comments
Assignees

Comments

@jgvictores
Copy link
Member

yarpserver returns a 1 upon failing to open, and a 130 on Control-C. That's great, because it complies with http://tldp.org/LDP/abs/html/exitcodes.html. My concerns:

  • yarprun: returns a 255 upon failing to open (because -1 is out of range), and a 0 on Control-C. The failure can be confusing for a .profile script that launches yarprun (in absence of a tool like icub-cluster.py in yarp, and maybe even for a script like such).
  • RFModule: returns a 255 upon failing to open (because -1 is out of range), and a 0 on Control-C. A 255 would be passed as a local exit code, however, yarprun attaches a -1 (YARPRUN_ERROR) to the response Bottle... some ambiguity here.
  • yarpview: returns a 0 upon failing to open, a 130 on Control-C.
@lornat75
Copy link
Member

lornat75 commented Feb 5, 2015

I am in favor of standardizing return values. My comments:

  • ok for returning 1 on failure
  • 0 signal success I guess
  • RFModule and yarprun catch Control-C and attempt smooth shutdown, in case of success I think they should return 0, 1 otherwise.

@jgvictores
Copy link
Member Author

@lornat75 Since bool return values within many functions limit the range to 2 different values, a 1 on failure and a 0 on success (obviating the originating signal) is a sound solution.

@pattacini pattacini self-assigned this Jul 20, 2015
@pattacini pattacini added this to the IFI Day 1 milestone Jul 20, 2015
pattacini added a commit to robotology/icub-main that referenced this issue Jul 20, 2015
pattacini added a commit to robotology/icub-tutorials that referenced this issue Jul 20, 2015
pattacini added a commit to robotology/icub-basic-demos that referenced this issue Jul 20, 2015
pattacini added a commit to pattacini/icub-contrib that referenced this issue Jul 20, 2015
pattacini added a commit to robotology/funny-things that referenced this issue Jul 20, 2015
pattacini added a commit to robotology/grasp that referenced this issue Jul 20, 2015
pattacini added a commit to robotology/himrep that referenced this issue Jul 20, 2015
pattacini added a commit to robotology/iol that referenced this issue Jul 20, 2015
pattacini added a commit to robotology/karma that referenced this issue Jul 20, 2015
pattacini added a commit to robotology-legacy/kinect-wrapper that referenced this issue Jul 20, 2015
pattacini added a commit to robotology/speech that referenced this issue Jul 20, 2015
pattacini added a commit to robotology/stereo-vision that referenced this issue Jul 20, 2015
gsaponaro pushed a commit to robotology/poeticon that referenced this issue Jul 21, 2015
pattacini added a commit to robotology/icub-basic-demos that referenced this issue Aug 17, 2015
alecive pushed a commit to robotology/icub-basic-demos that referenced this issue Aug 17, 2015
traversaro referenced this issue in robotology-legacy/codyco-modules Oct 16, 2015
- Added wholeBodyEstimator to codyco-modules if orocos-bfl is enabled.
- Created module and thread classes WholeBodyEstimatorModule/Thread
- Created classes QuaternionEKF and SingleLeggedOdometry
- Both classes inherit from a new base class called IEstimator.
gsaponaro pushed a commit to gsaponaro/yarp that referenced this issue Jun 29, 2016
…r, yarpmotorgui, yarpscope, yarpview return codes standardized: fixed robotology#395
@jgvictores jgvictores changed the title Standarize exit codes (mainly yarprun and RFModule) Standardize exit codes (mainly yarprun and RFModule) Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants