Date: Wed, 16 Jan 2002 02:09:44 -0800 From: Justin C.Walker <justin@mac.com> To: freebsd-hackers@FreeBSD.ORG Subject: Re: interesting open() issue Message-ID: <2A1269DA-0A69-11D6-A62A-00306544D642@mac.com> In-Reply-To: <20020116105923.A29210@hax0r.hu>
next in thread | previous in thread | raw e-mail | index | archive | help
My first guess is that the 'umask' differs in your various systems.
"man 2 umask".
Regards,
Justin
On Wednesday, January 16, 2002, at 01:59 AM, Foldi Tamas wrote:
> Hello hackers,
>
> I tried the following program on Tru64, FreeBSD and linux:
>
> #include <stdio.h>
> #include <fcntl.h>
> #include <sys/stat.h>
> #include <sys/types.h>
> main() {
> int fd;
> fd = open ( "/tmp/foobar", (O_RDWR | O_CREAT), 0020);
> perror("open");
> close(fd);
> }
>
> The program ran successfully, but the created file was different.
> On Linux:
> -----w---- 1 crow crow 0 Jan 16 10:32 /tmp/foobar
>
> On Tru64/FreeBSD:
> ---------- 1 crow users 0 Jan 16 10:30 /tmp/foobar
>
> I'm not sure what the result supposed to be. Any ideas ?
>
> Best Regards,
> Tamas Foldi
>
>
>
--
/~\ The ASCII Justin C. Walker, Curmudgeon-at-Large
\ / Ribbon Campaign
X Against HTML
/ \ Email
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2A1269DA-0A69-11D6-A62A-00306544D642>
