Date: Mon, 11 Mar 2002 11:28:04 -0800 From: Sean Harding <sharding@dogcow.org> To: freebsd-emulation@freebsd.org Subject: Possible bug with mkdir() in linux emulation? Message-ID: <20020311192804.GE7788@dogcow.org>
next in thread | raw e-mail | index | archive | help
I've recently run into a problem in running Mozilla Linux binaries on my FreeBSD system. This problem is documented in Mozilla bugs 125489 and 126113 (http://bugzilla.mozilla.org/show_bug.cgi?id=125489 and http://bugzilla.mozilla.org/show_bug.cgi?id=126113). What this seems to boil down to is that in Linux binaries on FreeBSD, mkdir() on an existing directory to whose parent I don't have write permission, errno is set to EACCES (13) instead of EEXIST (17). When the same binary is run on a real Linux system, errno is set to EEXIST. And when the same code is compiled natively on FreeBSD, it does the same. My sample code: int main(){ int result; result = mkdir("/home",(mode_t)0755); printf("Result is %d, errno is %d.\n",result,errno); return 0; } The output from a Linux binary on Linux: Result is -1, errno is 17. The output from the same binary on FreeBSD (4.5-STABLE and 4.5-RELEASE): Result is -1, errno is 13. The output from the code compiled natively on FreeBSD and run on the same machine: Result is -1, errno is 17. This doesn't seem right. Could someone shed some light on why this is happening? Thanks. sean -- Sean Harding sharding@dogcow.org | "I didn't sell out, I bought in. http://www.dogcow.org/sean/ | Remember that." | --Father, 'SLC Punk' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020311192804.GE7788>