.\" -*- coding: UTF-8 -*- .\" Copyright (c) 1992 Drew Eckhardt (drew@cs.colorado.edu), March 28, 1992 .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\" Modified by Michael Haardt .\" Modified 1993-07-21 by Rik Faith .\" Modified 1995-04-15 by Michael Chastain : .\" Added 'fchdir'. Fixed bugs in error section. .\" Modified 1996-10-21 by Eric S. Raymond .\" Modified 1997-08-21 by Joseph S. Myers .\" Modified 2004-06-23 by Michael Kerrisk .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH CHDIR 2 "2 agosto 2019" Linux "Manual do Programador do Linux" .SH NOME chdir, fchdir \- altera o diretório de trabalho .SH SINOPSE \fB#include \fP .PP \fBint chdir(const char *\fP\fIcaminho\fP\fB);\fP .br \fBint fchdir(int \fP\fIfd\fP\fB);\fP .PP .RS -4 Requisitos de macro de teste de recursos para o glibc (consulte \fBfeature_test_macros\fP(7)): .RE .PP \fBfchdir\fP(): .PD 0 .ad l .RS 4 .\" || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED _XOPEN_SOURCE\ >=\ 500 || /* Desde glibc 2.12: */ _POSIX_C_SOURCE\ >=\ 200809L || /* Glibc até e incluindo 2.19: */ _BSD_SOURCE .RE .ad .PD .SH DESCRIÇÃO \fBchdir\fP() altera o diretório atual de trabalho do processo chamador para o diretório especificado em \fIcaminho\fP. .PP \fBfchdir\fP() é idêntico a \fBchdir\fP(); a única diferença é que o diretório é fornecido com um descritor de arquivo aberto. .SH "VALOR DE RETORNO" Em caso de sucesso, zero é retornado. Caso contrário, \-1 é retornado, e \fIerrno\fP é selecionado adequadamente. .SH ERROS Dependendo do sistema de arquivos, outros erros podem ser retornados. Os erros mais gerais para \fBchdir\fP() são listados abaixo: .TP \fBEACCES\fP Permissão de pesquisa é negada em um dos componentes de \fIcaminho\fP. (Veja também \fBpath_resolution\fP(7).) .TP \fBEFAULT\fP \fIcaminho\fP aponta para fora de seu espaço de endereços acessíveis. .TP \fBEIO\fP Ocorreu um erro de E/S. .TP \fBELOOP\fP Muitos links simbólicos foram encontrados na resolução de \fIcaminho\fP. .TP \fBENAMETOOLONG\fP \fIcaminho\fP é muito longo. .TP \fBENOENT\fP O diretório especificado em \fIcaminho\fP não existe. .TP \fBENOMEM\fP A memória do kernel disponível foi insuficiente. .TP \fBENOTDIR\fP Um componente do \fIcaminho\fP não é um diretório. .PP Os erros gerais para \fBfchdir\fP() são listados abaixo: .TP \fBEACCES\fP Permissão de procura foi negada no diretório aberto em \fIfd\fP. .TP \fBEBADF\fP \fIfd\fP não é um descritor de arquivo válido. .TP \fBENOTDIR\fP \fIfd\fP não se refere a um diretório. .SH "DE ACORDO COM" POSIX.1\-2001, POSIX.1\-2008, SVr4, 4.4BSD. .SH NOTAS O diretório de trabalho atual é o ponto de partida para interpretar nomes de caminho relativos (aqueles que não começam com \(aq/\(aq)). .PP Um processo filho criado via \fBfork\fP(2) herda o diretório de trabalho atual de seu pai. O diretório de trabalho atual permanece inalterado por \fBexecve\fP(2). .SH "VEJA TAMBÉM" \fBchroot\fP(2), \fBgetcwd\fP(3), \fBpath_resolution\fP(7) .SH COLOFÃO Esta página faz parte da versão 5.10 do projeto Linux \fIman\-pages\fP. Uma descrição do projeto, informações sobre relatórios de bugs e a versão mais recente desta página podem ser encontradas em \%https://www.kernel.org/doc/man\-pages/. .PP .SH TRADUÇÃO A tradução para português brasileiro desta página man foi criada por André Luiz Fassone e Rafael Fontenelle . .PP Esta tradução é uma documentação livre; leia a .UR https://www.gnu.org/licenses/gpl-3.0.html Licença Pública Geral GNU Versão 3 .UE ou posterior para as condições de direitos autorais. Nenhuma responsabilidade é aceita. .PP Se você encontrar algum erro na tradução desta página de manual, envie um e-mail para .MT debian-l10n-portuguese@lists.debian.org a lista de discussão de tradutores .ME .