[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: IMG_4053.jpg (943 KB, 1170x1159)
943 KB
943 KB JPG
previous: >>108479107

#define __NR_rt_sigtimedwait    128

https://man7.org/linux/man-pages/man2/sigtimedwait.2.html

tl;dr:
wait for a signal

it's pretty nice that this gives the option to provide a timeout. i am always a little wary about calling functions that perform a blocking wait without the ability to provide a timeout. if even one tiny little thing goes wrong, boom deadlock.
so for that reason, this syscall is decently nice.
it's a bit unfortunate that it can't wait for synchronous signals, but then again, you wouldn't really be waiting for those, anyway. in most cases, i think you're probably better off with signal handlers, but i guess i could see some use cases for this guy. it's just a bit annoying that you have to block the signals in all other threads first. god, that's actually one thing about signals that's always really, really grossed me out: it's totally arbitrary which thread handles a signal. uhh, excuse me? fucking why? well, i know why. it would be marginally less performant to have any sort of sane logic apply, and well we wouldn't want that, now would we, silly? so we as developers are left to work around this, gross hacks be damned

relevant resources:
man man

man syscalls

https://man7.org/linux/man-pages/
https://linux.die.net/man/
https://elixir.bootlin.com/linux/
https://elixir.bootlin.com/musl/
https://elixir.bootlin.com/glibc/
>>
What’s wrong with you people?
>>
>>108485406
sudo kill yourself
>>
doas love syscall anon
>>
>>108485472
thank u for being nice ;___;
>>
>>108485423
Wtf is syscall? What's the purpose of this thread?
>>
>>108485423
>>108485451
>>108485406
Tell me
>>
I for one like syscall anon and his threads
>>
>>108486120
What's a syscall and why are people hating?
>>
>that's actually one thing about signals that's always really, really grossed me out: it's totally arbitrary which thread handles a signal
Yeah, it's fucked. But unix was designed in a world without multithreading.
Anything involving signals is just fucked in general. I try to avoid them
>>
>>108486127
>why are people hating?
salty for OP's perky little tits
>>
>>108486364
Is it some gooner pdf shit?
>>
>>108486439
doubt, OP is in late 20s
>>
>grooming thread
>>
i kiss you whole body, love from Pakistan
>>
>>108485406
cute rape victim
>>
>>108486120
i would trade all the AI and pajeettech cellphone mac threads for more random knowledge threads like this.
>>
>>108485406
well, signals have been there from the very beginning, whereas threads were sort of bolted on later
>>
>>108486120
i'm a girl btw
>>
bampu
>>
>>108490502
bumping!!!!!
>>
>>108485406
The girl in the OP image is pleasant, but the caption gives off major tranny vibes.
>>
>>108485406
can't wait till we get to rseq
>>
>>108490933
you're not gonna believe this



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.