globus_callback_signal(3)
π globus_callback_signal(3) π
okay bestie, welcome to the Library Functions Manual page for globus_callback_signal β she's giving signal handling, she's giving callbacks, she's lowkey the whole vibe of the Globus Callback Signal Handling situation β¨
πΈ NAME πΈ
globus_callback_signal β Globus Callback Signal Handling
- Globus Callback Signal Handling. (yes she says it twice, she's that confident π )
β¨ SYNOPSIS β¨
π Miscellaneous π
globus_result_t globus_callback_space_register_signal_handler (int signum, globus_bool_t persist, globus_callback_func_t callback_func, void *callback_user_arg, globus_callback_space_t space)β fire off a callback the moment the signal you asked for shows up. main character notification energy πglobus_result_t globus_callback_unregister_signal_handler (int signum, globus_callback_func_t unregister_callback, void *unreg_arg)β unregister a signal handling callback. it's giving "we're done here" πvoid globus_callback_add_wakeup_handler (void(*wakeup)(void *), void *user_arg)β register a wakeup handler with the callback library. hey bestie, wake up βοΈ#define GLOBUS_SIGNAL_INTERRUPTβ the macro, she's here, she's iconic β¨
Detailed Description
Globus Callback Signal Handling. periodt. π«Ά
π¦ Macro Definition Documentation π¦
#define GLOBUS_SIGNAL_INTERRUPT
Use this to trap interrupts (SIGINT on unix, iykyk). And in the future? she's gonna also map to handling ctrl-C on win32. not yet, but soon, manifesting it π
π Function Documentation π
void globus_callback_add_wakeup_handler (void(* wakeup )(void *), void * user_arg)
Register a wakeup handler with the callback library. ngl this is really only needed in non-threaded builds, but for cross builds you should be using it everywhere that a callback might sleep for an extended period of time. no cap. π΄
An example use is for an io poller that sleeps indefinitely on select(). So like, if the callback library receives a signal that it needs to deliver asap, it will call the wakeup handler(s). These wakeup handlers must run as though they were called from a signal handler (so pls don't use any thread utilities, that's a red flag π©). The io poll example will likely write a single byte to a pipe that select() is monitoring. cute, efficient, slay.
This handler will not be unregistered until the callback library is deactivated (via common). she's committed fr fr π
Parameters
wakeupβ function to call when the callback library needs you to return asap from any blocked callbacks.user_argβ user data that will be passed along in the wakeup handler.
globus_result_t globus_callback_space_register_signal_handler (int signum, globus_bool_t persist, globus_callback_func_t callback_func, void * callback_user_arg, globus_callback_space_t space)
Fire a callback when the specified signal is received. okay so heads up: there's a tiny delay between the time this call returns and the signal is actually handled by this library. so if the signal arrived the exact instant the call returned, it will likely be lost π. (this is normally not an issue though, since you'd be calling this in your startup code anyway β no stress bestie.)
Parameters
signumβ the signal to receive. but bestie, listen, the following signals are not allowed:SIGKILL,SIGSEGV,SIGABRT,SIGBUS,SIGFPE,SIGILL,SIGIOT,SIGPIPE,SIGEMT,SIGSYS,SIGTRAP,SIGSTOP,SIGCONT, andSIGWAITING. do not try it. it's giving forbidden πpersistβ ifGLOBUS_TRUE, keep this callback registered for multiple signals. ifGLOBUS_FALSE, the signal handler will automatically be unregistered once the signal has been received. one and done πcallback_funcβ the user func to call when a signal is received.callback_user_argβ user arg that will be passed to callback.spaceβ the space to deliver callbacks to.
Returns
GLOBUS_CALLBACK_ERROR_INVALID_SPACEGLOBUS_CALLBACK_ERROR_INVALID_ARGUMENTGLOBUS_SUCCESSotherwise β¨
globus_result_t globus_callback_unregister_signal_handler (int signum, globus_callback_func_t unregister_callback, void * unreg_arg)
Unregister a signal handling callback. the breakup text, but make it API π΅
Parameters
signumβ the signal to unregister.unregister_callbackβ the function to call when the callback has been canceled and there are no running instances of it (may beNULL). This will be delivered to the same space used in the register call.unreg_argβ user arg that will be passed to callback.
Returns
GLOBUS_CALLBACK_ERROR_INVALID_ARGUMENTβ if this signal was registered withpersist == false, then there is a race between a signal actually being caught and therefore automatically unregistered, and the attempt to manually unregister it. If that race occurs, you will receive this error just as you would for any signal not registered. it's giving chaos, watch out π΅βπ«GLOBUS_SUCCESSotherwise π
π Author π
Generated automatically by Doxygen for globus_common from the source code. (so if the vibes are immaculate, thank the source code, not me π«Ά)
okay that's the whole page, bestie, you ate that ππ
β this lil manual came to you from globus_common, Version 18.15, and she's the globus_callback_signal(3) page, so go forth and register those signal handlers responsibly. mwah! πππ¦
π¦ where this page comes from
- epel 10: globus-common-doc 18.15-1.el10_2 Β· Apache-2.0
- fedora 43: globus-common-doc 18.15-1.fc43 Β· Apache-2.0
- fedora 44: globus-common-doc 18.15-2.fc44 Β· Apache-2.0
- ubuntu resolute: libglobus-common-doc 18.15-1 Β· Apache-2.0
- ubuntu stonking: libglobus-common-doc 18.15-2 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms