Hack to read /proc filesystem

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@10311 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
CaS 2001-07-07 04:36:01 +00:00
parent 927e64252e
commit 14c68f4793
3 changed files with 71 additions and 18 deletions

View file

@ -6,8 +6,14 @@
int main ()
{
id pool = [NSAutoreleasePool new];
id o = [NSObject new];
id o = [NSObject new];
printf ("Hello from object at 0x%x\n", (unsigned)[o self]);
o = [NSString stringWithFormat: @"/proc/%d/status", getpid()];
NSLog(@"'%@'", o);
o = [NSString stringWithContentsOfFile: o];
NSLog(@"'%@'", o);
exit (0);
}
#else