ping_get_error(3)

πŸ“¦
version 1.10.0 Β· 8 versions
, in alpine 3.24, epel 10, epel 9, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

πŸ’– ping_get_error β€” bestie edition πŸ’–

okay so this is a page from the liboping manual, section 3 (that's the library-calls girlies ✨), and today's main character is ping_get_error. she's tiny. she's simple. she ate. let's go 🫢


✨ NAME ✨

ping_get_error β€” return the last error message πŸ’…


🌸 SYNOPSIS 🌸

like, the whole vibe in four lines, no cap:

#include <oping.h>

const char *ping_get_error (pingobj_t *obj);

πŸ¦‹ DESCRIPTION πŸ¦‹

so ping_get_error hands you back an error message, and that message is telling you about the last error that got encountered. that's it. that's the function. she's giving "receipts for what just went wrong" πŸ“πŸ’€

⚠️ the tea: this method is not thread safe whatsoever. not "mostly fine", not "fine if you squint" β€” whatsoever. if you're out here calling this from multiple threads at once, that's not it, bestie 😭πŸ”ͺ

πŸŽ€ RETURN VALUE πŸŽ€

you get back a "const" string, and that string is the last error. and if nothing has gone wrong yet? you get an empty string β€” no error, no drama, just vibes 🌈✨


πŸ‘‘ SEE ALSO πŸ‘‘


πŸ’œ AUTHOR πŸ’œ

liboping is written by Florian "octo" Forster <ff at octo.it>. her homepage lives at <http://noping.cc/> β€” go say hi 🏠🫢

Copyright (c) 2006-2017 by Florian "octo" Forster.


and that's the whole page, periodt πŸ’… version 1.10.0, dated 2017-05-11, and yeah this was ping_get_error(3) the whole time πŸŽ€ stay safe, stay const, don't share your error buffer across threads 🧚✨