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


previous: >>108084144

#define __NR_alarm                37

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

god i hate async. signals too.
it's strange that this is preserved across an exec. why?

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/
>>
desu, this syscall is so dumb that i wouldn't even feel bad if no one replied to this thread. it's when there's ACTUALLY interesting stuff happening that it's a bit disheartening
>>
>alarm() and setitimer(2) share the same timer; calls to one will interfere with use of the other.
>sleep(3) may be implemented using SIGALRM; mixing calls to alarm() and sleep(3) is a bad idea.
>>
>>108092980
alarm() and setitimer(2) share the same timer; calls to one will interfere with use of the oher.
interfere with each other like how exactly? If I have two separate processes running and one uses alarm() and the other setitimer(), do they interfere? Does one cancel the other? Isn't that a big security risk?
>>
>>108094167
>interfere with each other like how exactly?
https://elixir.bootlin.com/linux/v6.18.6/source/kernel/time/itimer.c#L327
>If I have two separate processes running and one uses alarm() and the other setitimer(), do they interfere?
no, because they are separate processes
>>
>>108066842
with this one I find it interesting that it returns -1, even though it's expected behaviour. It makes sense from a certain point of view, but I don't agree with it.
>>>108077803
ignore that person, he was being unnecessarily rude (and retarded, too! shocker!)
>>108092980
>it's strange that this is preserved across an exec. why?
maybe you've exec'd some heavy process that you don't want to eat up too much time.
but very funny syscall. Send it off and forget about it and be bitten in the arse by it some time later. I'd prefer to do this in userspace, but it has a hacky niceness to it it shares with other early day syscalls.
>>
>>108093118
I'm sorry, I wasn't around for a couple of days:(
I always find these very delightful
>>
File: 1770580558586136.jpg (65 KB, 736x621)
65 KB
65 KB JPG
>>108095455
>with this one I find it interesting that it returns -1, even though it's expected behaviour. It makes sense from a certain point of view, but I don't agree with it.
lol yeah. i could totally see the argument for either always returning 0 or -1, but i agree it feels a bit strange.
>maybe you've exec'd some heavy process that you don't want to eat up too much time.
i just think it's really strange the sets of things that are/aren't preserved across forks, execs, etc. and some things are only partially preserved! it's quite interesting
>>108095468
i will forgive u just this once.....
>>
>>108095535
>it's quite interesting
and an absolute mess to think about when using exec with complex programme state
>>
>>108092980
thought that was a penis when i saw it on the catalog
>>
>>108097239
sorry to disappoint



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