From owner-freebsd-emulation Sun Jan 7 18:16:34 2001 Delivered-To: freebsd-emulation@freebsd.org Received: from kleopatra.acc.umu.se (kleopatra.acc.umu.se [130.239.18.150]) by hub.freebsd.org (Postfix) with ESMTP id 38EED37B698 for ; Sun, 7 Jan 2001 18:15:05 -0800 (PST) Received: from shaka.acc.umu.se (markush@shaka-fddi.acc.umu.se [192.168.18.148]) by kleopatra.acc.umu.se (8.11.2/8.11.2) with ESMTP id f082Ew317164 for ; Mon, 8 Jan 2001 03:14:58 +0100 Received: (from markush@localhost) by shaka.acc.umu.se (8.10.0/8.10.0) id f082EtO10612 for freebsd-emulation@freebsd.org; Mon, 8 Jan 2001 03:14:55 +0100 (MET) Date: Mon, 8 Jan 2001 03:14:54 +0100 From: Markus Holmberg To: freebsd-emulation@freebsd.org Subject: getcwd(3) after rmdir(2) or unlink(2) fails under Linux emulation Message-ID: <20010108031454.A10576@acc.umu.se> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="IJpNTDwzlM2Ie8A6" Content-Disposition: inline User-Agent: Mutt/1.3-current-20000511i Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org --IJpNTDwzlM2Ie8A6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi. If modifying the current directory by either removing a directory or unlinking a file (in one program), a subsequenct call to getcwd(3) in another program executing under Linux emulation will fail. This can be demonstrated by running the attached C program (compiled under Linux) after removing a directory or a file in the current directory. Unfortunately due to limited experience in the kernel area I do not have a patch to contribute. Unless the matter is brought forward in some way on this list in a couple of days time I will send-pr it to make sure it gets archived... I'm running FreeBSD 4.2-STABLE from 2001-01-04. Cheers, Markus. (I'm not on the list, cc if more input is needed from me.) -- Markus Holmberg | Give me Unix or give me a typewriter. markush@acc.umu.se | http://www.freebsd.org/ --IJpNTDwzlM2Ie8A6 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="cwd.c" #include #include #define BUFSIZE 1024 int main(int argc, char *argv[]) { char buf[BUFSIZE]; if (getcwd(buf, BUFSIZE) == NULL) { perror("getcwd"); return 1; } printf("%s\n", buf); return 0; } --IJpNTDwzlM2Ie8A6-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message