From owner-freebsd-bugs Sat Jan 13 17:50:20 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 498FA37B404 for ; Sat, 13 Jan 2001 17:50:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f0E1o1G91725; Sat, 13 Jan 2001 17:50:01 -0800 (PST) (envelope-from gnats) Received: from romy.carbonide.com (romy.carbonide.com [212.105.74.73]) by hub.freebsd.org (Postfix) with ESMTP id D048F37B402 for ; Sat, 13 Jan 2001 17:46:36 -0800 (PST) Received: by romy.carbonide.com (Postfix, from userid 1000) id C3B13382A; Sun, 14 Jan 2001 02:46:22 +0100 (CET) Message-Id: <20010114014622.C3B13382A@romy.carbonide.com> Date: Sun, 14 Jan 2001 02:46:22 +0100 (CET) From: markush@acc.umu.se Reply-To: markush@acc.umu.se To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: kern/24315: getcwd under Linux emulation fails after rmdir Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 24315 >Category: kern >Synopsis: getcwd under Linux emulation fails after a rmdir >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Jan 13 17:50:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: Markus Holmberg >Release: FreeBSD 4.2-STABLE i386 >Organization: n/a >Environment: FreeBSD 4.2-STABLE >Description: After doing a rmdir(2) on a directory (in FreeBSD "mode", in a shell for example), a program executing under Linux emulation will fail the call to getcwd with the error "Not a directory". >How-To-Repeat: $ cd /tmp $ ./cwd /tmp $ mkdir foo $ rmdir foo $ ./cwd getcwd: Not a directory # to "fix" the problem, do a "cd ." $ cd . $ ./cwd /tmp cwd.c: ------------------------------------------------------ #include #include int main(int argc, char *argv[]) { char *buf; if ((buf = getcwd(NULL, 0)) == NULL) { perror("getcwd"); return 1; } printf("%s\n", buf); return 0; } ------------------------------------------------------ >Fix: Not known. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message