www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/02/22/19:26:45

Message-Id: <199902230026.AAA40508@out1.ibm.net>
From: "Mark E." <snowball3 AT usa DOT net>
To: djgpp-workers AT delorie DOT com
Date: Mon, 22 Feb 1999 19:26:43 -0500
MIME-Version: 1.0
Subject: chroot.txh
X-mailer: Pegasus Mail for Win32 (v3.01d)
Reply-To: djgpp-workers AT delorie DOT com

Tommorrow already? Well, here's my first cut at chroot.txh:

*** chroot.txh   Mon Feb 22 18:05:28 1999
--- src/libc/posix/unistd/chroot.txh	Mon Feb 22 19:16:30 1999
***************
*** 0 ****
--- 1,34 ----
+ @node chroot, file system
+ @subheading Syntax
+ 
+ @example
+ #include <unistd.h>
+ 
+ int chroot(const char *new_root_directory);
+ @end example
+ 
+ @subheading Description
+ 
+ This function changes the root directory for absolute paths
+ to @var{new_root_directory}. If @var{new_root_directory} is NULL
+ or points to an empty string, then the root directory will be
+ will be the actual root directory of the current working drive.
+ 
+ @subheading Return Value
+ 
+ Always returns 0 to indicate the root directory
+ was successfully changed.
+ 
+ @subheading Portability
+ 
+ @portability !ansi, posix
+ 
+ @subheading Example
+ 
+ @example
+ int status;
+ chroot("c:/djgpp");
+ status = access("/bin/gcc.exe");
+ printf ("status = %i\n", status);
+ @end example
+ 

--- 
Mark Elbrecht
snowball3 AT usa DOT net http://members.xoom.com/snowball3/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019