No. The function is clearly defined as int fork(void); meaning it doesn't take any arguments. Although nothing stops you from just writing a prototype in your own code, like void *fork(int x); and it would *compile* then, but that doesn't guarantee the code runs (the opposite is more probable).
24
u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live" Nov 30 '25
All I can think of here is on what systems does
fork()take an argument?4
u/maelstrom071 Nov 30 '25
timeworks?
3
u/v_maria Dec 02 '25
is this actually from youtube
197
u/kenjura Nov 30 '25
my favorite language, c--
257
u/birdiefoxe Nov 30 '25
I feel like this might actually compile if Omega wasn't a void* and wasn't used as a bool and like the 29 other things wrong about it weren't true
39
u/CraftBox Nov 30 '25
Γ++
15
u/barthanismyname Dec 01 '25
fork(rand()%9999) scares me...
I know it isn't valid, but what if one day you woke up and it was
8
u/Hot-Rock-1948 [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live" Dec 01 '25
True programming horror, thank you.
Like there are so many things wrong with this that I would rather not look at it.
2
u/runklebunkle Dec 01 '25
Also, not using a fixed-width font?
49
u/[deleted] Nov 30 '25
[removed] — view removed comment