* RE: File permission problems with new cygwin dll
@ 2002-10-17 13:09 Ross Smith
0 siblings, 0 replies; 10+ messages in thread
From: Ross Smith @ 2002-10-17 13:09 UTC (permalink / raw)
To: 'cygwin@cygwin.com'
> From: Christopher Faylor [mailto:cgf@redhat.com]
>
> On Thu, Oct 17, 2002 at 03:17:11PM +1300, Ross Smith wrote:
> >If you take any command-line program that writes to stdout
> -- plain old
> >"hello world" will do fine -- compile it with gcc, and run it several
> >times with >> somefile, then you get a file containing several copies
> >of "hello world", as you'd expect. But if you compile it with Visual
> >C++ instead, then instead of appending to the file, it just
> overwrites
> >the beginning of the file every time.
>
> Should be fixed in cvs. I'm generating a snapshot.
>
> The problem was caused by this change from Pavel Tsekov:
>
> http://sources.redhat.com/ml/cygwin-cvs/2002-q3/msg00064.html
>
> I had a nagging feeling that this was a problem when it was
> checked in.
>
> My fix still keeps this patch but it resets file pointers
> before execing
> a new process. That seems to work.
Thank you!
--
Ross Smith ...................... Pharos Systems, Auckland, New Zealand
This has been a test of the emergency broadcasting system. If this had
been a real emergency, we would have all fled in terror, and you would
not have been notified.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: File permission problems with new cygwin dll
2002-10-17 16:12 ` Pavel Tsekov
@ 2002-10-17 19:03 ` Christopher Faylor
0 siblings, 0 replies; 10+ messages in thread
From: Christopher Faylor @ 2002-10-17 19:03 UTC (permalink / raw)
To: cygwin
On Fri, Oct 18, 2002 at 12:19:29AM +0200, Pavel Tsekov wrote:
>On Thu, 17 Oct 2002, Christopher Faylor wrote:
>
>> On Thu, Oct 17, 2002 at 03:17:11PM +1300, Ross Smith wrote:
>> >If you take any command-line program that writes to stdout -- plain old
>> >"hello world" will do fine -- compile it with gcc, and run it several
>> >times with >> somefile, then you get a file containing several copies
>> >of "hello world", as you'd expect. But if you compile it with Visual
>> >C++ instead, then instead of appending to the file, it just overwrites
>> >the beginning of the file every time.
>>
>> Should be fixed in cvs. I'm generating a snapshot.
>>
>> The problem was caused by this change from Pavel Tsekov:
>>
>> http://sources.redhat.com/ml/cygwin-cvs/2002-q3/msg00064.html
>>
>> I had a nagging feeling that this was a problem when it was checked in.
>>
>> My fix still keeps this patch but it resets file pointers before execing
>> a new process. That seems to work.
>
>I should have been more careful. My mistake is that I didn't understand
>why the file pointer should be moved on open () back then. Removing this
>code fixed an "obivious" bug and seemed reasonable. Now as I looked at
>the code you've checked in dtable.cc, everything seems clear.
>
>Sorry :(
Hey, I wasn't pointing fingers! I should have made that very clear. I
approved the checkin and I should understand the code pretty thoroughly.
I should have remembered why the file pointer code was in open. I'm
glad that we did things this way. Your patch makes cygwin slightly
faster and I *think* that handling the problem in exec makes things even
more correct than they were prior to your patch.
cgf
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: File permission problems with new cygwin dll
2002-10-17 11:19 ` Christopher Faylor
@ 2002-10-17 16:12 ` Pavel Tsekov
2002-10-17 19:03 ` Christopher Faylor
0 siblings, 1 reply; 10+ messages in thread
From: Pavel Tsekov @ 2002-10-17 16:12 UTC (permalink / raw)
To: cygwin
On Thu, 17 Oct 2002, Christopher Faylor wrote:
> On Thu, Oct 17, 2002 at 03:17:11PM +1300, Ross Smith wrote:
> >If you take any command-line program that writes to stdout -- plain old
> >"hello world" will do fine -- compile it with gcc, and run it several
> >times with >> somefile, then you get a file containing several copies
> >of "hello world", as you'd expect. But if you compile it with Visual
> >C++ instead, then instead of appending to the file, it just overwrites
> >the beginning of the file every time.
>
> Should be fixed in cvs. I'm generating a snapshot.
>
> The problem was caused by this change from Pavel Tsekov:
>
> http://sources.redhat.com/ml/cygwin-cvs/2002-q3/msg00064.html
>
> I had a nagging feeling that this was a problem when it was checked in.
>
> My fix still keeps this patch but it resets file pointers before execing
> a new process. That seems to work.
I should have been more careful. My mistake is that I didn't understand
why the file pointer should be moved on open () back then. Removing this
code fixed an "obivious" bug and seemed reasonable. Now as I looked at
the code you've checked in dtable.cc, everything seems clear.
Sorry :(
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: File permission problems with new cygwin dll
2002-10-16 19:53 Ross Smith
@ 2002-10-17 11:19 ` Christopher Faylor
2002-10-17 16:12 ` Pavel Tsekov
0 siblings, 1 reply; 10+ messages in thread
From: Christopher Faylor @ 2002-10-17 11:19 UTC (permalink / raw)
To: cygwin
On Thu, Oct 17, 2002 at 03:17:11PM +1300, Ross Smith wrote:
>If you take any command-line program that writes to stdout -- plain old
>"hello world" will do fine -- compile it with gcc, and run it several
>times with >> somefile, then you get a file containing several copies
>of "hello world", as you'd expect. But if you compile it with Visual
>C++ instead, then instead of appending to the file, it just overwrites
>the beginning of the file every time.
Should be fixed in cvs. I'm generating a snapshot.
The problem was caused by this change from Pavel Tsekov:
http://sources.redhat.com/ml/cygwin-cvs/2002-q3/msg00064.html
I had a nagging feeling that this was a problem when it was checked in.
My fix still keeps this patch but it resets file pointers before execing
a new process. That seems to work.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: File permission problems with new cygwin dll
@ 2002-10-16 19:53 Ross Smith
2002-10-17 11:19 ` Christopher Faylor
0 siblings, 1 reply; 10+ messages in thread
From: Ross Smith @ 2002-10-16 19:53 UTC (permalink / raw)
To: 'cygwin@cygwin.com'
> From: Christopher Faylor [mailto:cgf@redhat.com]
>
> On Thu, Oct 17, 2002 at 11:09:31AM +1300, Ross Smith wrote:
> >I just upgraded to the new cygwin dll and gcc, and I seem to
> be running
> >into some of the same problems reported by others. (Yes, I know ntsec
> >is now enabled by default.)
> >
> >First problem: chmod doesn't work. Whenever I try to use it,
> I just get
> >"chmod: changing permissions of `foo': Invalid argument".
>
> As a guess, that would probably be an indication that your /etc/passwd
> is out of sync with your Windows account. Rerunning mkpasswd
> may help.
Thanks. After some trial and error with the mkpasswd options, I
managed to get passwd & group files that worked.
However, I've had to revert to the old cygwin dll after all, because of
another bug. There's some strange breakage that makes redirection with
>> not work with non-cygwin programs.
If you take any command-line program that writes to stdout -- plain old
"hello world" will do fine -- compile it with gcc, and run it several
times with >> somefile, then you get a file containing several copies
of "hello world", as you'd expect. But if you compile it with Visual
C++ instead, then instead of appending to the file, it just overwrites
the beginning of the file every time.
This just started with the new dll, so it's something to do with the
changes between 1.3.12-4 and 1.3.13-2.
--
Ross Smith ...................... Pharos Systems, Auckland, New Zealand
This has been a test of the emergency broadcasting system. If this had
been a real emergency, we would have all fled in terror, and you would
not have been notified.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: File permission problems with new cygwin dll
@ 2002-10-16 16:52 Rolf Campbell
0 siblings, 0 replies; 10+ messages in thread
From: Rolf Campbell @ 2002-10-16 16:52 UTC (permalink / raw)
To: cygwin
It didn't fix the sigsegv problem with gdb, but I was also having
problems with gcc producing .exe files that didn't have execute
permissions.
-Rolf
> -----Original Message-----
> From: Christopher Faylor [mailto:cgf@redhat.com]
> Sent: Wednesday, October 16, 2002 7:26 PM
> To: cygwin@cygwin.com
> Subject: Re: File permission problems with new cygwin dll
>
>
> On Wed, Oct 16, 2002 at 07:23:25PM -0400, Rolf Campbell wrote:
> >That fixed all of my problems! "mkpasswd -du mywindowslogin >
> >/etc/passwd", and then gcc started producing programs that were
> >executable again.
>
> Wow. I'm amazed. I didn't expect that it would fix those
> kind of problems. I'm glad that it did.
>
> cgf
>
> --
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting: http://cygwin.com/bugs.html
> Documentation: http://cygwin.com/docs.html
> FAQ: http://cygwin.com/faq/
>
>
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: File permission problems with new cygwin dll
2002-10-16 16:49 Rolf Campbell
@ 2002-10-16 16:50 ` Christopher Faylor
0 siblings, 0 replies; 10+ messages in thread
From: Christopher Faylor @ 2002-10-16 16:50 UTC (permalink / raw)
To: cygwin
On Wed, Oct 16, 2002 at 07:23:25PM -0400, Rolf Campbell wrote:
>That fixed all of my problems! "mkpasswd -du mywindowslogin >
>/etc/passwd", and then gcc started producing programs that were
>executable again.
Wow. I'm amazed. I didn't expect that it would fix those kind
of problems. I'm glad that it did.
cgf
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: File permission problems with new cygwin dll
@ 2002-10-16 16:49 Rolf Campbell
2002-10-16 16:50 ` Christopher Faylor
0 siblings, 1 reply; 10+ messages in thread
From: Rolf Campbell @ 2002-10-16 16:49 UTC (permalink / raw)
To: cygwin
That fixed all of my problems! "mkpasswd -du mywindowslogin >
/etc/passwd", and then gcc started producing programs that were
executable again.
-Rolf
> -----Original Message-----
> From: Christopher Faylor [mailto:cgf@redhat.com]
> Sent: Wednesday, October 16, 2002 7:05 PM
> To: cygwin@cygwin.com
> Subject: Re: File permission problems with new cygwin dll
>
>
> On Thu, Oct 17, 2002 at 11:09:31AM +1300, Ross Smith wrote:
> >I just upgraded to the new cygwin dll and gcc, and I seem to
> be running
> >into some of the same problems reported by others. (Yes, I
> know ntsec
> >is now enabled by default.)
> >
> >First problem: chmod doesn't work. Whenever I try to use it,
> I just get
> >"chmod: changing permissions of `foo': Invalid argument".
>
> As a guess, that would probably be an indication that your
> /etc/passwd is out of sync with your Windows account.
> Rerunning mkpasswd may help.
>
> --
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting: http://cygwin.com/bugs.html
> Documentation: http://cygwin.com/docs.html
> FAQ: http://cygwin.com/faq/
>
>
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: File permission problems with new cygwin dll
2002-10-16 16:00 Ross Smith
@ 2002-10-16 16:23 ` Christopher Faylor
0 siblings, 0 replies; 10+ messages in thread
From: Christopher Faylor @ 2002-10-16 16:23 UTC (permalink / raw)
To: cygwin
On Thu, Oct 17, 2002 at 11:09:31AM +1300, Ross Smith wrote:
>I just upgraded to the new cygwin dll and gcc, and I seem to be running
>into some of the same problems reported by others. (Yes, I know ntsec
>is now enabled by default.)
>
>First problem: chmod doesn't work. Whenever I try to use it, I just get
>"chmod: changing permissions of `foo': Invalid argument".
As a guess, that would probably be an indication that your /etc/passwd
is out of sync with your Windows account. Rerunning mkpasswd may help.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 10+ messages in thread
* File permission problems with new cygwin dll
@ 2002-10-16 16:00 Ross Smith
2002-10-16 16:23 ` Christopher Faylor
0 siblings, 1 reply; 10+ messages in thread
From: Ross Smith @ 2002-10-16 16:00 UTC (permalink / raw)
To: 'cygwin@cygwin.com'
I just upgraded to the new cygwin dll and gcc, and I seem to be running
into some of the same problems reported by others. (Yes, I know ntsec
is now enabled by default.)
First problem: chmod doesn't work. Whenever I try to use it, I just get
"chmod: changing permissions of `foo': Invalid argument".
Second problem: gcc doesn't set execute permission on the .exe files it
creates.
For the moment I've "solved" the problems by switching off ntsec
(CYGWIN=nontsec in the system variables), so I don't urgently need a
solution. I've seen other people report similar problems, but nobody
has suggested a solution (at least to the ones that weren't due to
simple ignorance of ntsec).
--
Ross Smith ...................... Pharos Systems, Auckland, New Zealand
This has been a test of the emergency broadcasting system. If this had
been a real emergency, we would have all fled in terror, and you would
not have been notified.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2002-10-18 1:06 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-17 13:09 File permission problems with new cygwin dll Ross Smith
-- strict thread matches above, loose matches on Subject: below --
2002-10-16 19:53 Ross Smith
2002-10-17 11:19 ` Christopher Faylor
2002-10-17 16:12 ` Pavel Tsekov
2002-10-17 19:03 ` Christopher Faylor
2002-10-16 16:52 Rolf Campbell
2002-10-16 16:49 Rolf Campbell
2002-10-16 16:50 ` Christopher Faylor
2002-10-16 16:00 Ross Smith
2002-10-16 16:23 ` Christopher Faylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).