Imported tab->space correction by redhat
[infodrom/manpages-de] / man2 / chdir.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright (c) 1992 Drew Eckhardt (drew@cs.colorado.edu), March 28, 1992
4 .\"
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one
13 .\" 
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein.  The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
20 .\" professionally.
21 .\" 
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\"
25 .\" Modified by Michael Haardt <michael@moria.de>
26 .\" Modified Wed Jul 21 22:10:52 1993 by Rik Faith <faith@cs.unc.edu>
27 .\" Modified 15 April 1995 by Michael Chastain <mec@shell.portal.com>:
28 .\"   Added 'fchdir'.
29 .\"   Fix bugs in error section.
30 .\" Modified Mon Oct 21 23:05:29 EDT 1996 by Eric S. Raymond <esr@thyrsus.com>
31 .\" Modified by Joseph S. Myers <jsm28@cam.ac.uk>, 970821
32 .\" Translated into german by Daniel Kobras (kobras@linux.de)
33 .\"
34 .TH CHDIR 2 "23. Januar 2001" "Linux 2.0.30" "Systemaufrufe"
35 .SH BEZEICHNUNG
36 chdir, fchdir \- Aktuelles Arbeitsverzeichnis wechseln.
37 .SH "ÜBERSICHT"
38 .B #include <unistd.h>
39 .sp
40 .BI "int chdir(const char *" Pfad );
41 .br
42 .BI "int fchdir(int " fd ");"
43 .SH BESCHREIBUNG
44 .B chdir
45 ändert das aktuelle Verzeichnis in das durch
46 .I Pfad
47 angegebene Verzeichnis.
48 .PP
49 .B fchdir
50 ist identisch zu
51 .BR chdir ,
52 jedoch wird der Verzeichnispfad als geöffneter Dateideskriptor übergeben.
53 .SH "RÜCKGABEWERT"
54 Ist das Arbeitsverzeichnis erfolgreich geändert, wird 0 zurückgegeben.
55 Tritt ein Fehler auf, wird \-1 zurückgegeben und
56 .I errno
57 entsprechend der Fehlerursache gesetzt.
58 .SH FEHLER
59 Welche Fehler im einzelnen zurückgeliefert werden, hängt ab vom verwendeten
60 Dateisystem. Die folgenden Auflistungen nennen lediglich die allgemein
61 üblichen.
62 .PP
63 Zunächst die Fehler für
64 .BR chdir :
65 .TP
66 .B EFAULT
67 .I Pfad
68 zeigt auf einen Speicherbereich außerhalb des erlaubten Adressraums des
69 Prozesses.
70 .TP
71 .B ENAMETOOLONG
72 .I Pfad
73 ist zu lang.
74 .TP
75 .B ENOENT
76 Der angegebene Pfadname existiert nicht.
77 .TP
78 .B ENOMEM
79 Das Betriebssystem verfügt nicht über ausreichend Speicher, um die Anweisung
80 auszuführen.
81 .TP
82 .B ENOTDIR
83 Eine Komponente von
84 .I Pfad
85 ist kein Verzeichnis.
86 .TP
87 .B EACCES
88 Dem Prozess ist nicht erlaubt, eine Komponente von
89 .I Pfad
90 zu durchsuchen.
91 .TP
92 .B ELOOP
93 .I Pfad
94 enthält zu viele symbolische Verweise.
95 .TP
96 .B EIO
97 Ein Ein-/Ausgabefehler ist aufgetreten.
98 .PP
99 Übliche Fehler bei
100 .BR fchdir :
101 .TP
102 .B EBADF
103 .I fd
104 ist kein gültiger Dateideskriptor.
105 .TP
106 .B EACCES
107 Es ist nicht erlaubt, das durch
108 .I fd
109 angegebene Verzeichnis zu durchsuchen.
110 .SH "KONFORM ZU"
111 Der
112 .BR chdir -Aufruf
113 ist vereinbar mit SVr4, SVID, POSIX, X/OPEN und 4.4BSD.  SVr4 legt die
114 zusätzlichen Fehler EINTR, ENOLINK und EMULTIHOP fest, besitzt jedoch kein
115 ENOMEM.  In POSIX.1 treten weder ENOMEM noch ELOOP auf.
116 X/OPEN erwähnt nicht die Fehler EFAULT, ENOMEM und EIO.
117 .PP
118 Der
119 .BR fchdir -Aufruf
120 ist vereinbar mit SVr4, 4.4BSD und X/OPEN.
121 SVr4 legt die zusätzlichen Fehler EIO, EINTR und ENOLINK fest.
122 X/OPEN definiert zusätzlich EINTR und EIO.
123 .SH "SIEHE AUCH"
124 .BR getcwd (3),
125 .BR chroot (2).