Corinna Vinschen | 2 Aug 2004 14:30
Picon
Favicon

Re: Fix dup for /dev/dsp

On Jul 31 12:03, Pierre A. Humblet wrote:
> At 10:22 AM 7/30/2004 +0200, Corinna Vinschen wrote:
> >Hi Guys,
> >
> >do we have any further news?
> 
> Barring news from Gerd, I will submit a proper patch.

Sounds good.  May I suggest to submit only a patch to solve the dup
problem in the first place, so fixing this annoyance for 1.5.11 and
only submit any more complex patch for the next Cygwin version?

Corinna

--

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Co-Project Leader          mailto:cygwin <at> cygwin.com
Red Hat, Inc.

Pierre A. Humblet | 4 Aug 2004 02:23
Picon

[Patch] mapping root directory to SystemDrive / CurrentDrive

Here is a patch.

Pierre

2004-08-04  Pierre Humblet <pierre.humblet <at> ieee.org>

	* cygheap.h (cwdstuff::drive_length): New member.
	(cwdstuff::get_drive): New method.
	* path.cc (normalize_win32_path): Simplify by using cwdstuff::get_drive.
	(mount_info::conv_to_win32_path): Use cwdstuff::get_drive as default for /.
	(cwdstuff::set): Initialize drive_length.

Index: cygheap.h
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/cygheap.h,v
retrieving revision 1.85
diff -u -p -r1.85 cygheap.h
--- cygheap.h	28 May 2004 19:50:05 -0000	1.85
+++ cygheap.h	4 Aug 2004 00:08:31 -0000
 <at>  <at>  -216,9 +216,16  <at>  <at>  struct cwdstuff
   char *posix;
   char *win32;
   DWORD hash;
+  DWORD drive_length;
   muto *cwd_lock;
   char *get (char *, int = 1, int = 0, unsigned = CYG_MAX_PATH);
   DWORD get_hash ();
+  DWORD get_drive (char * dst) 
(Continue reading)

Christopher Faylor | 4 Aug 2004 04:20
Favicon

Re: [Patch] mapping root directory to SystemDrive / CurrentDrive

On Tue, Aug 03, 2004 at 08:23:52PM -0400, Pierre A. Humblet wrote:
>Here is a patch.

Thanks much but unless you are really really sure that this patch will
introduce no regressions, I'd like to hold off applying this patch until
after 1.5.11.

cgf

>2004-08-04  Pierre Humblet <pierre.humblet <at> ieee.org>
>
>	* cygheap.h (cwdstuff::drive_length): New member.
>	(cwdstuff::get_drive): New method.
>	* path.cc (normalize_win32_path): Simplify by using cwdstuff::get_drive.
>	(mount_info::conv_to_win32_path): Use cwdstuff::get_drive as default for /.
>	(cwdstuff::set): Initialize drive_length.

Charles Reindorf | 10 Aug 2004 12:36

array size problem in select.cc


Cygwin developers,

I was browsing in "winsup/cygwin/select.cc" from snapshot 20040808-1 and I
think I see an array size problem there, resutling in possible core dumps when
selecting about 63 file descriptors. I wonder if the following patch is
applicable?

-- Charles Reindorf.

*** ../cygwin.bak/select.cc	Tue Aug 10 11:27:26 2004
--- select.cc	Tue Aug 10 11:27:38 2004
***************
*** 223,229 ****
  		    DWORD ms)
  {
    int wait_ret;
!   HANDLE w4[MAXIMUM_WAIT_OBJECTS];
    select_record *s = &start;
    int m = 0;
    int res = 0;
--- 223,229 ----
  		    DWORD ms)
  {
    int wait_ret;
!   HANDLE w4[MAXIMUM_WAIT_OBJECTS+1];
    select_record *s = &start;
    int m = 0;
    int res = 0;

(Continue reading)

Corinna Vinschen | 10 Aug 2004 16:43
Picon
Favicon

Re: array size problem in select.cc

On Aug 10 11:36, Charles Reindorf wrote:
> Cygwin developers,
> 
> I was browsing in "winsup/cygwin/select.cc" from snapshot 20040808-1 and I
> think I see an array size problem there, resutling in possible core dumps when
> selecting about 63 file descriptors. I wonder if the following patch is
> applicable?
> 
> -- Charles Reindorf.
> 
> *** ../cygwin.bak/select.cc	Tue Aug 10 11:27:26 2004
> --- select.cc	Tue Aug 10 11:27:38 2004
> ***************
> *** 223,229 ****
>   		    DWORD ms)
>   {
>     int wait_ret;
> !   HANDLE w4[MAXIMUM_WAIT_OBJECTS];
>     select_record *s = &start;
>     int m = 0;
>     int res = 0;
> --- 223,229 ----
>   		    DWORD ms)
>   {
>     int wait_ret;
> !   HANDLE w4[MAXIMUM_WAIT_OBJECTS+1];
>     select_record *s = &start;
>     int m = 0;
>     int res = 0;
> 
(Continue reading)

Christopher Faylor | 10 Aug 2004 17:04
Favicon

Re: array size problem in select.cc

On Tue, Aug 10, 2004 at 11:36:41AM +0100, Charles Reindorf wrote:
>Cygwin developers,
>
>I was browsing in "winsup/cygwin/select.cc" from snapshot 20040808-1 and I
>think I see an array size problem there, resutling in possible core dumps when
>selecting about 63 file descriptors. I wonder if the following patch is
>applicable?

Thanks, but, the correct change is this:

Index: select.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/select.cc,v
retrieving revision 1.93
diff -u -p -r1.93 select.cc
--- select.cc   10 Apr 2004 13:45:10 -0000      1.93
+++ select.cc   10 Aug 2004 14:24:02 -0000
 <at>  <at>  -233,7 +233,7  <at>  <at>  select_stuff::wait (fd_set *readfds, fd_
      counting the number of active fds. */
   while ((s = s->next))
     {
-      if (m > MAXIMUM_WAIT_OBJECTS)
+      if (m >= MAXIMUM_WAIT_OBJECTS)
        {
          set_sig_errno (EINVAL);
          return -1;

I'll make that change.  Thanks for the heads up.

cgf
(Continue reading)

Charles Reindorf | 10 Aug 2004 17:18

Re: array size problem in select.cc

Yeah. D'oh!

On 10.08.2004 at 16:04:47, Christopher Faylor
<cgf-no-personal-reply-please <at> cygwin.com> wrote:

> On Tue, Aug 10, 2004 at 11:36:41AM +0100, Charles Reindorf wrote:
> >Cygwin developers,
> >
> >I was browsing in "winsup/cygwin/select.cc" from snapshot 20040808-1 and
> I
> >think I see an array size problem there, resutling in possible core dumps
> when
> >selecting about 63 file descriptors. I wonder if the following patch is
> >applicable?
> 
> Thanks, but, the correct change is this:
> 
> Index: select.cc
> ===================================================================
> RCS file: /cvs/src/src/winsup/cygwin/select.cc,v
> retrieving revision 1.93
> diff -u -p -r1.93 select.cc
> --- select.cc   10 Apr 2004 13:45:10 -0000      1.93
> +++ select.cc   10 Aug 2004 14:24:02 -0000
>  <at>  <at>  -233,7 +233,7  <at>  <at>  select_stuff::wait (fd_set *readfds, fd_
>       counting the number of active fds. */
>    while ((s = s->next))
>      {
> -      if (m > MAXIMUM_WAIT_OBJECTS)
> +      if (m >= MAXIMUM_WAIT_OBJECTS)
(Continue reading)

Pierre A. Humblet | 14 Aug 2004 01:13
Picon

[Patch]: Re: CVS commit under windows 98


A feature present in open was missing from open9x.

Pierre

2004-08-14  Pierre Humblet <pierre.humblet <at> ieee.org>

	* fhandler.cc (fhandler_base::open_9x): Set file attributes
	for new files.

Index: fhandler.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/fhandler.cc,v
retrieving revision 1.201
diff -u -p -r1.201 fhandler.cc
--- fhandler.cc 17 Jun 2004 15:25:09 -0000      1.201
+++ fhandler.cc 13 Aug 2004 23:12:42 -0000
 <at>  <at>  -480,9 +480,14  <at>  <at>  fhandler_base::open_9x (int flags, mode_
     }
 #endif

-  /* If mode has no write bits set, we set the R/O attribute. */
-  if (!(mode & (S_IWUSR | S_IWGRP | S_IWOTH)))
-    file_attributes |= FILE_ATTRIBUTE_READONLY;
+  if (flags & O_CREAT && get_device () == FH_FS)
+    {
+      /* If mode has no write bits set, we set the R/O attribute. */
+      if (!(mode & (S_IWUSR | S_IWGRP | S_IWOTH)))
+        file_attributes |= FILE_ATTRIBUTE_READONLY;
+      /* The file attributes are needed for later use in, e.g. fchmod. */
(Continue reading)

Christopher Faylor | 14 Aug 2004 02:01
Favicon

Re: [Patch]: Re: CVS commit under windows 98

On Fri, Aug 13, 2004 at 07:13:26PM -0400, Pierre A. Humblet wrote:
>A feature present in open was missing from open9x.
>
>2004-08-14  Pierre Humblet <pierre.humblet <at> ieee.org>
>
>	* fhandler.cc (fhandler_base::open_9x): Set file attributes
>	for new files.

Please checkin.

cgf

Pierre A. Humblet | 14 Aug 2004 05:49
Picon

[Patch]: fhandler_dsp.cc

This patch to fhandler_dsp.cc fixes all issues with dup and 
redirection, using archetypes. 
It also takes care of not freezing Win9X (that was a real pain
to debug). 
It passes the testsuite (slightly modified, patch coming), 
as well as all my tests. 

The logic of the interface to Windows audio is unchanged.

The ChangeLog is long because the code is organized as
many small functions, and they needed small changes.
I hope Gerd will be able to take a look.

Pierre

2004-08-14  Pierre Humblet <pierre.humblet <at> ieee.org>

	* fhandler.h (fhandler_dev_dsp:~fhandler_dev_dsp): Delete.
	(fhandler_dev_dsp::open_count): Delete.		   
	(fhandler_dev_dsp::close_audio_in): New method declaration.
	(fhandler_dev_dsp::close_audio_in): Ditto.
	* fhandler_dsp.cc: Add and edit debug_printf throughout.
	(fhandler_dev_dsp::Audio::denyAccess): Delete.
	(fhandler_dev_dsp::Audio::fork_fixup): Ditto.
	(fhandler_dev_dsp::Audio::getOwner): Ditto.
	(fhandler_dev_dsp::Audio::clearOwner): Ditto.
	(fhandler_dev_dsp::Audio::owner_): Ditto.
	(fhandler_dev_dsp::Audio::setformat): Ditto, rename to setconvert.
	(fhandler_dev_dsp::Audio::lock): Ditto, move to queue.
	(fhandler_dev_dsp::Audio::unlock): Ditto.
(Continue reading)


Gmane