GithubHelp home page GithubHelp logo

Completion of error handling about fbkutils HOT 1 CLOSED

elfring avatar elfring commented on June 8, 2024
Completion of error handling

from fbkutils.

Comments (1)

jcalvinowens avatar jcalvinowens commented on June 8, 2024

Would you like to add more error handling for return values from functions like the following?

Netconsd is Linux-specific, and none of the cases you cite can actually fail with Linux/glibc/nptl: see below. If you really want to send a pull request to fatal() if they return errors, that's fine and we'd merge it, but IMO it's not worth the trouble.

pthread_mutex_init -> create_worker_threads

See [1], this can't fail in practice: it doesn't allocate. Similarly, [2][3][4][5] show the rest can't either.

sigaction -> init_sighandlers

This one also can't fail in practice, see [6].

[1] https://code.woboq.org/userspace/glibc/nptl/pthread_mutex_init.c.html#56
[2] https://code.woboq.org/userspace/glibc/nptl/pthread_cond_init.c.html#27
[3] https://code.woboq.org/userspace/glibc/nptl/pthread_condattr_init.c.html#24
[4] https://code.woboq.org/userspace/glibc/nptl/pthread_condattr_setclock.c.html#28
[5] https://code.woboq.org/userspace/glibc/sysdeps/unix/sysv/linux/futex-internal.h.html#52
[6] https://elixir.bootlin.com/linux/v4.20-rc4/source/kernel/signal.c#L3497

from fbkutils.

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.