Subject: Re: kern/4099: Gather coredumps in one place
To: Ty Sarna <firstname.lastname@example.org>
From: UNIX hacker and security officer <email@example.com>
Date: 09/09/1997 11:40:33
Ty Sarna sez:
* I should have phrased the question more precisely:
* "Is there no way to accomplish that in the kernel short of walking up
* the tree _myself_?"
* In other words, is there no getcwd()-like functionality in the kernel?
* It seems like someone else would have probably needed it for something
* by now.
You would, indeed, have to walk up the tree yourself. getcwd() or getwd()
(It's been a while since I've used the call, so pardon the ambiguity)
are written in user space and have never been system calls.
I'm not altogether sure why you'd want to keep current-directory information
around anyway. You'd have core files which were large and unwieldy to
access, and this would not necessarily be a good thing.
* Unfortunately, I don't understand the vnode system (esp. the locking
* issues, which nobody seem to understand!) well enough to write something
* like a vgetpath() myself. There are also some issues, like the fact
* that I want the path relative to the One True "/", not the processes's
* "/". Other uses might want a process-relative path, though. A
* generalized vgetpath() would have to take the where-to-stop-walking-up
* vnode as an argument.
John Woods had it right on the mark: "Inodes don't kill people,
people kill wups, wrong saying..."
"Did her eyes at the Turn of the Century tell me plainly
How we'll meet, how we'll love? Oh, let life so transform me..."
-> James Graham, Songwriter, Musician, Programmer and Hopeless Romantic <-