# \#signal-handling

**URL:** https://discourse.julialang.org/tag/signal-handling/832.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Save a local variable when program is killed](https://discourse.julialang.org/t/save-a-local-variable-when-program-is-killed/128218)

<div class="topic-metadata">

**Author:** [@Yue-Zhengyuan](https://discourse.julialang.org/u/Yue-Zhengyuan)\
**Replies:** 5\
**Last updated:** [April 20, 2025, 9:54pm UTC](https://discourse.julialang.org/t/save-a-local-variable-when-program-is-killed/128218 "2025-04-20T21:54:57Z")

</div>

I have a Julia program that performs some long operation on a variable, and I hope that when the program is killed by a job management system such as SLURM, the program can save the current local state of the variable to…

---

## [Capturing SIGHUP or SIGUSR1/2](https://discourse.julialang.org/t/capturing-sighup-or-sigusr1-2/69771)

<div class="topic-metadata">

**Author:** [@bluesmoon](https://discourse.julialang.org/u/bluesmoon)\
**Replies:** 1\
**Last updated:** [January 5, 2024, 6:59pm UTC](https://discourse.julialang.org/t/capturing-sighup-or-sigusr1-2/69771 "2024-01-05T18:59:28Z")

</div>

I know how to capture SIGINT via an InterruptException and how to attach a signal handler using atexit, but neither of those solves my requirement. I need to capture either of SIGHUP, SIGUSR1, or SIGUSR2 so that I can r…

---

## [How do I obtain \`sizeof(struct sigaction)\`? Clang.jl?](https://discourse.julialang.org/t/how-do-i-obtain-sizeof-struct-sigaction-clang-jl/84344)

<div class="topic-metadata">

**Author:** [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Replies:** 4\
**Last updated:** [July 18, 2022, 8:33am UTC](https://discourse.julialang.org/t/how-do-i-obtain-sizeof-struct-sigaction-clang-jl/84344 "2022-07-18T08:33:42Z")

</div>

I would like to figure out the value printed by this C program in Julia. #include \<signal.h\> #include \<stdio.h\> int main() { printf("%ld", sizeof(struct sigaction)); return 0; } On my system, this print…
