From owner-freebsd-bugs Tue Mar 28 12:33:59 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from kot.ne.mediaone.net (kot.ne.mediaone.net [24.218.15.190]) by hub.freebsd.org (Postfix) with ESMTP id 71B5537C019 for ; Tue, 28 Mar 2000 12:33:54 -0800 (PST) (envelope-from mi@kot.ne.mediaone.net) Received: from rtfm.newton (root@rtfm.newton [10.10.0.1]) by kot.ne.mediaone.net (8.9.3/8.9.1) with ESMTP id PAA70117; Tue, 28 Mar 2000 15:33:52 -0500 (EST) From: Mikhail Teterin X-Relay-IP: 10.10.0.1 Received: (from mi@localhost) by rtfm.newton (8.9.3/8.9.3) id PAA02117; Tue, 28 Mar 2000 15:33:51 -0500 (EST) (envelope-from mi@kot.ne.mediaone.net) Message-Id: <200003282033.PAA02117@rtfm.newton> Subject: Re: bin/7063: mount fails if $PWD does not exist In-Reply-To: <38E0E067.B04452A@we.lc.ehu.es> from "Jose M. Alcaide" at "Mar 28, 2000 06:40:07 pm" To: "Jose M. Alcaide" Date: Tue, 28 Mar 2000 15:33:51 -0500 (EST) Cc: freebsd-bugs@FreeBSD.ORG X-Face: %UW#n0|w>ydeGt/b@1-.UFP=K^~-:0f#O:D7w hJ5G_<5143Bb3kOIs9XpX+"V+~$adGP:J|SLieM31VIhqXeLBli" The following reply was made to PR bin/7063; it has been noted by GNATS. => It appears, the problem is with realpath(3), which mount => invokes. realpath() insists on . being openable. => => May be, something like the attached is needed (damn the goto)? => => In any case, an entry in the CAVEATS section of realpath(3) => is in order explaining its behavior in case `.' does not => exist. => = =I submitted a related PR: bin/12244 Indeed. But your fix will still not work for the case when the . does not even exist, so chdir()-ing back will fail anyway. :) This is not as legitimate a scenario as the one you describe, but it does happen... In case of mount, nobody cares, what CWD it had when it exited, but some other program may, for some reason, care not to chdir() out of the non-existant `.' -mi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message