Re: interesting open() issue

2002-01-16 Thread Terry Lambert
Foldi Tamas wrote: > > Hello hackers, > > I tried the following program on Tru64, FreeBSD and linux: > > #include > #include > #include > #include > main() { > int fd; > fd = open ( "/tmp/foobar", (O_RDWR | O_CREAT), 0020); > perror("open"); > close(

Re: interesting open() issue

2002-01-16 Thread Julian Elischer
He's talking about the different 'group' setting.. I think. it's different because SYSV (linux is based on the semantics of sysV) and BSD have a differnt semantic on this and always have.. BSD makes the file get the same group as the directory. Linux gives it the primary group of the creator. Lin

Re: interesting open() issue

2002-01-16 Thread Greg Black
Foldi Tamas wrote: | Hello hackers, Don't send this sort of newbie programmer question to the hackers list (or to any of the FreeBSD lists). | I tried the following program on Tru64, FreeBSD and linux: | | #include | #include | #include | #include | main() { | int fd; |

Re: interesting open() issue

2002-01-16 Thread Andrew
On Wed, 16 Jan 2002, Foldi Tamas wrote: > The program ran successfully, but the created file was different. > On Linux: > -w1 crow crow0 Jan 16 10:32 /tmp/foobar > > On Tru64/FreeBSD: > --1 crow users 0 Jan 16 10:30 /tmp/foobar What

Re: interesting open() issue

2002-01-16 Thread Justin C . Walker
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 > #include > #include > #in

interesting open() issue

2002-01-16 Thread Foldi Tamas
Hello hackers, I tried the following program on Tru64, FreeBSD and linux: #include #include #include #include main() { int fd; fd = open ( "/tmp/foobar", (O_RDWR | O_CREAT), 0020); perror("open"); close(fd); } The program ran successfully, but the