site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=sbcglobal.net; h=Received:X-YMail-OSG:Mime-Version:Content-Type:Message-Id:Cc:Content-Transfer-Encoding:From:Subject:Date:To:X-Mailer; b=IEecZzKuebZAsDnIQRtittHV4h4kkOjK6ULkkTGRdqsxgXs4HOx6X8ENNr30srchvvpTR6FvaQ3B9LwB0jsfeGS6oZj6AnY1tFPkjysPoYrZ/hp7Ieo4z1fwUZU7JMUvG6FG85LTaUiVr/QzEKt0L2fkbxX7QIPQ06I89mvYUro= ; Hi, Thanks, Tony _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... I'm trying to programatically get and save the current working directory using a low-level system call. They key points are that I need to store the path string for later use and whatever system call I use must be available in single-user mode. Using a call like system ("/bin/pwd") displays the path to stdout but I can't figure out how to redirect the string to a character array for later concatenation. Since the string already exists in the PWD env variable, is there some way to read that in a C program? I'm not sure the latter is the best way though since the user's shell may be different than bash. I've been searching the online docs for hours and haven't found a way to do this yet. This email sent to site_archiver@lists.apple.com
participants (1)
-
Tony Scaminaci