public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Opening COM2
@ 1997-04-03 13:20 Bob Wilson
  1997-04-03 22:44 ` Jim Balter
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Bob Wilson @ 1997-04-03 13:20 UTC (permalink / raw)
  To: gnu-win32

I have a program which ran correctly when compiled on a gnu-win32
package from about a year ago, but is failing when compiled with 17.1
beta.  The machine is running NT 3.51 and COM2 is connected to a
microprocessor with only td, rd and ground connected.  The open:

        if ((comfd = open("com2", O_RDWR | O_TEXT)) <= 0) {
            fprintf(stderr, "Cmd: Unable to open terminal\n");
            exit(1);
        }

hangs.  It doesn't help to tie the modem control lines high, but if I
generate a few characters on the rd line, the open completes.  In no
case is there an error return.

I have looked for this problem in the FAQ and looked for archives of
this mailing list, but both searches failed.

Can anyone help?

Thanks,
Bob Wilson
rwilson@cfa.harvard.edu
-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: Opening COM2
@ 1997-04-07  8:52 David Fiddes
  0 siblings, 0 replies; 8+ messages in thread
From: David Fiddes @ 1997-04-07  8:52 UTC (permalink / raw)
  To: gnu-win32

> My guess is that this is due to the symbolic link handling.
> When you open a file, cygwin will read the first few bytes
> of the file to see if it has the special marker that is used
> to indicate a symbolic link; if so, then cygwin will open the
> file that the link points to.  Obviously this won't work
> correctly in the case of device files such as `com2'...
> 

Would this cause GDB to hang when trying to connect to a target "monitor"
on a development board. GDB seems to support(from it's list of targets and
the source) my monitor(dBUG for ColdFire) but it hangs when I type "target
dbug com2" (the default port settings for COM2 are OK). I haven't stuck a
terminal or a protocol analyser on it yet.....

-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Opening COM2
@ 1997-05-14 22:52 Markus Maeder
  0 siblings, 0 replies; 8+ messages in thread
From: Markus Maeder @ 1997-05-14 22:52 UTC (permalink / raw)
  To: gnu-win32

Bob Wilson posted a message some time ago with some C source lines:

        if ((comfd = open("com2", O_RDWR | O_TEXT)) <= 0) {
            fprintf(stderr, "Cmd: Unable to open terminal\n");
            exit(1);
        }

He stated, this doesnt function under b17. open hangs...

It seems, that this doesn't work under b18 either. Is there a patch?

Regards,
Markus



-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: Opening COM2
@ 1997-05-15 14:19 Gary Liddle
  0 siblings, 0 replies; 8+ messages in thread
From: Gary Liddle @ 1997-05-15 14:19 UTC (permalink / raw)
  To: gnu-win32, Markus.Maeder

the way to do it is
to 

fp = fopen("com2", "whatever");
comfd = fileno(fp);



> 
> Bob Wilson posted a message some time ago with some C source lines:
> 
>         if ((comfd = open("com2", O_RDWR | O_TEXT)) <= 0) {
>             fprintf(stderr, "Cmd: Unable to open terminal\n");
>             exit(1);
>         }
> 
> He stated, this doesnt function under b17. open hangs...
> 
> It seems, that this doesn't work under b18 either. Is there a patch?
> 
> Regards,
> Markus
> 
> 
> 
> -
> For help on using this list (especially unsubscribing), send a message to
> "gnu-win32-request@cygnus.com" with one line of text: "help".
> 
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Opening COM2
@ 1997-05-15 23:48 Markus Maeder
  0 siblings, 0 replies; 8+ messages in thread
From: Markus Maeder @ 1997-05-15 23:48 UTC (permalink / raw)
  To: gnu-win32

Sorry, it seems to work on another Computer.

I have to check configurations....

Bye,
Markus Maeder

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~1997-05-15 23:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-04-03 13:20 Opening COM2 Bob Wilson
1997-04-03 22:44 ` Jim Balter
1997-04-03 23:05 ` Fergus Henderson
1997-04-07 15:27 ` Geoffrey Noer
1997-04-07  8:52 David Fiddes
1997-05-14 22:52 Markus Maeder
1997-05-15 14:19 Gary Liddle
1997-05-15 23:48 Markus Maeder

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).