linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Chris Ridd <Chris.Ridd@messagingdirect.com>
To: linuxppc-dev@lists.linuxppc.org
Subject: Re: serial on lombard
Date: Thu, 14 Oct 1999 13:35:48 +0100	[thread overview]
Message-ID: <4461.939904548@MessagingDirect.com> (raw)
In-Reply-To: Your message of "Thu, 14 Oct 1999 14:31:51 +0300." <3805BF27.1944652E@fadata.bg>


On Thu, 14 Oct 1999 14:31:51 +0300, Momchil Velikov wrote:
> 
> Michael Schmitz wrote:
> > 
> > > alarm(0x2, 0x7ffff7b4, 0, 0x8, 0x7f7f7f7f) = 0
> > > open("/dev/ttyS0", O_RDWR|O_NONBLOCK)   = 3
> > > --- SIGALRM (Alarm clock) ---
> > > alarm(0, 0x1, 0, 0x8, 0x7f7f7f7f)       = 0
> > > rt_sigaction(0xe, 0x7ffff698, 0x7ffff728, 0x8) = 0
> > > write(2, "minicom: cannot open /dev/ttyS0:"..., 59minicom: cannot open /dev/ttyS0: No such file or directory
> > > ) = 59
> > 
> > The port blocks on open, and you get a timeout.
> 
> But there is O_NONBLOCK, and according to POSIX, 
> " ... if O_NONBLOCK flags is set or if CLOCAL has been set,
>   the open() function shall return immediately without
>   waiting for the connection."
> 
> Note that this is the/a way to set CLOCAL -- open the device with O_NONBLOCK
> and then tcsetattr() or whatever.

The open on /dev/ttyS0 returns a valid fd, so it is succeeding. As BenH 
pointed out, the problem is the SIGALRM ringing which causes Minicom to 
erroneously think it couldn't open the device.

Chris


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

  reply	other threads:[~1999-10-14 12:35 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-10-14 19:12 serial on lombard Mario Scarpa
1999-10-14 11:06 ` Benjamin Herrenschmidt
1999-10-14 11:19 ` Michael Schmitz
1999-10-14 11:31   ` Momchil Velikov
1999-10-14 12:35     ` Chris Ridd [this message]
1999-10-14 13:06       ` Benjamin Herrenschmidt
1999-10-14 13:43         ` Momchil Velikov
1999-10-14 14:21         ` Michael Schmitz
1999-10-14 14:34           ` Benjamin Herrenschmidt
1999-10-14 14:53             ` Momchil Velikov
1999-10-14 16:10               ` Michael Schmitz
1999-10-15  7:26                 ` Momchil Velikov
1999-10-14 16:00             ` Michael Schmitz
1999-10-14 16:10               ` Benjamin Herrenschmidt
1999-10-14 17:41                 ` Michael Schmitz
1999-10-15  4:12                   ` Mario Scarpa
1999-10-15  8:33                     ` Benjamin Herrenschmidt
1999-10-15 20:17                       ` Mario Scarpa
1999-10-15  8:42                     ` Michael Schmitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4461.939904548@MessagingDirect.com \
    --to=chris.ridd@messagingdirect.com \
    --cc=linuxppc-dev@lists.linuxppc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).