Giter Site home page Giter Site logo

clixon_backend not running. about clixon HOT 9 CLOSED

clicon avatar clicon commented on August 29, 2024
clixon_backend not running.

from clixon.

Comments (9)

olofhagsand avatar olofhagsand commented on August 29, 2024 1

I understand. I will change so that the char for getopt is signed. NP. Are there other problems on ARM?

from clixon.

olofhagsand avatar olofhagsand commented on August 29, 2024

I havent tested on ARM.

  • Try clixon_cli or clixon_restconf (same result?)
  • Run in gdb with -F. (configure --enable-debug)
  • Valgrind?

from clixon.

shubhtrix avatar shubhtrix commented on August 29, 2024

Ya found the problem!!!

See on ARM "char" behaves as a "unsigned char" so under "/apps/backend/backend_main.c" we have a while loop under main inside that you defined char c; for getopt . So on ARM machine this char c gets a value after all the short-options c updates with a value of 255 oxff which never terminates the while loop with -1 .

from clixon.

olofhagsand avatar olofhagsand commented on August 29, 2024

@shubhtrix what is the fix? Change char to signed char/int8_t? I would like to patch the src to cover this case.

from clixon.

shubhtrix avatar shubhtrix commented on August 29, 2024

@olofhagsand ya sorry for a quick fix on that I applied a simple int not tried with int8_t or signed char. As per the problem is concerned, hopefully both should work (signed char and int8_t). I'll let you know if the time permits after testing with signed char and int8_t. Untill then be with the same char or maybe an int because on any x86 arch. it works fine just the ARM which is causing the problem.

from clixon.

shubhtrix avatar shubhtrix commented on August 29, 2024

@olofhagsand Sorry to disturb you again, but ya I've realized that the same thing exists in clixon_restconf, clixon_netconf, example_backend, example_restconf etc. I mean wherever you used getopt

from clixon.

shubhtrix avatar shubhtrix commented on August 29, 2024

@olofhagsand sorry for late reply, I don't have any other problem yet.

But I have a query... "Is it necessary to run the restconf daemon with user : www-data? I mean what if I run the daemon with root user, any problem in that? And if you think any consequences regarding the functionally of the same."

from clixon.

olofhagsand avatar olofhagsand commented on August 29, 2024

There is some related discussion here:
#37
Also in the slack:
https://clixondev.slack.com/messages/C9M4TC9MW/

from clixon.

olofhagsand avatar olofhagsand commented on August 29, 2024

Outdated question

from clixon.

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.