[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

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


File: 1767226477506167.jpg (316 KB, 600x800)
316 KB
316 KB JPG
previous: >>107868194

#define __NR_rt_sigaction        13

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

you can tell, just by looking at the length of the man page, that this is a complicated one. go ahead and read https://man7.org/linux/man-pages/man7/signal.7.html as well, to get yourself up to speed, if you're not already familiar. god, this topic is so complex, i'm really not even sure what to put in this blurb. there is certainly a lot of room for discussion of signals in general, so maybe we'll go with that.
oh, i guess this part is also interesting
>The new system call takes a fourth argument, size_t sigsetsize, which specifies the size in bytes of the signal sets in act.sa_mask and oldact.sa_mask
because they kept fucking themselves over by hardcoding things, over time the linux kernel developers started making more of their syscalls take a variable input (often via a pointer to a struct) alongside its expected size. clever optimization on their end

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/
>>
>>107878988
>because they kept fucking themselves over by hardcoding things, over time the linux kernel developers started making more of their syscalls take a variable input (often via a pointer to a struct) alongside its expected size. clever optimization on their end
so clever, good job linuxtards. this is how windows APIs and system calls have worked since the beginning of windows nt. linshitters only started figuring this out decades after they started developing their kernel.
>>
>>107879090
well, you know. better late than never
>>
>>107878988
man7 page for signal(2) has this wonderful line:
typedef typeof(void (int))  *sighandler_t;

which replaces the older line
typedef void (*sighandler_t)(int);

which I think was more readable, desu.
Both are admittedly more readable than the old
void (*signal(int, void (*)(int)))(int);
>>
>>107880368
any time you're doing typedefs of function signatures, readability is going to be a little bit difficult
>>
>>107881327
I think
typedef void (*sighandler_t)(int);

is pretty readable
>>
>>107881427
that's fair. it generally is, i would agree. i do wish C had something like C++ using syntax
>>
>>107880368
Anything that isn't signalfd is a dogshit interface and you shouldn't use it.
>>
>>107878988
when are you going to talk about pledge and unveil? those are the only syscalls i want to learn about
>>
>>107881914
When your retarded ass submits a patch to Linus Torvalds with an implementation of that shit nobody cares about.



[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.