previous: >>108310106#define __NR_getcwd 79https://man7.org/linux/man-pages/man2/getcwd.2.htmltl;dr:get your current working directory (lol) this guy doesn't even have a real section 2 entry...the (unreachable) bit is pretty interesting. other than that, though, mostly a boring syscall superceded by the ability to open a dirfd on "." and later fchdir to it. nice for shell use, i guessrelevant resources: man manman syscallshttps://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/
#define __NR_getcwd 79
man man
man syscalls
marina is cute
>>108316723No usecase. If knowing the current directory matters to your program, you did something wrong.
>>108316809i mean, it definitely matters for shells
OP is totally kissable
>>108316931this is much better than >>108310122 so thank you!
>>108263011
>>108317070that one is also pretty lewd lolsex is bad and evil!!!
>>108317053i hope you blush or make funny sounds every time you read some other anon reply to your posts like this
>>108316815IIRC they do their own bookkeeping in order to remember which symlinks you used to get to where you areAnd then I guess they do some extra bullshit so that cd .. does what you expect? Never thought about itpwd(1) has a flag to decide whether to print the physical cwd or the logical cwd inherited from the shell's env var
>>108317209
>>108317673seems like a lot of bookkeeping for a shell to manage...
>>108316809>my labmates chdir inside python functions all the time>get offended when I say it's retarded
weak shit>program arguments as program input>std in as program input>config files as program input>GUI as program inputreal shit>program input is the name of the working directory folder
>>108310122>>108263011>>108317053QRD me, is OP a woman?
>>108320673wh-why would you ever do this...>>108320678maybe...
>>108320678op is cute which is more important
>>108320811n-no... that's not how it works...
>>108321051that's literally how it works for me
>>108316752Asya mogs
>>108319100it is a shell after all, they've a lot to juggle
>>108322039haha, that's fair>>108321164very interesting.......
>>108323187oh you're backwhat's your job?
>>108316723zato
>>108323228i'm a software developer, as one might expect
>>108321439True that